Next: How do I make Emacs behave like this: when I go up or down, the cursor should stay in the same column even if the line is too short?, Previous: How do I change Emacs’s idea of the TAB character’s length?, Up: Common requests [Contents][Index]
To do this to an entire buffer, type M-< M-x replace-regexp RET ^ RET your text RET.
To do this to a region, use
Set the mark (C-SPC) at the beginning of the first line you
want to prefix, move the cursor to last line to be prefixed, and type
M-x string-insert-rectangle RET. To do this for the whole
buffer, type C-x h M-x string-insert-rectangle RET.
If you are trying to prefix a yanked mail message with ‘>’, you
might want to set the variable
mail-yank-prefix. In Message
buffers, you can even use M-; to cite yanked messages (M-;
runs the function
comment-region, it is a general-purpose
mechanism to comment regions) (see How do I change the included text prefix in mail/news followups?).