Path: utzoo!mnetor!uunet!husc6!bloom-beacon!think!ames!nrl-cmf!cmcl2!rutgers!nysernic!weltyc From: weltyc@nysernic (Christopher A. Welty) Newsgroups: comp.emacs Subject: Re: macro to put the > in front of copied messages Message-ID: <605@nysernic> Date: 29 Jan 88 22:53:58 GMT References: <894@xn.LL.MIT.EDU> Sender: nobody@nysernic Reply-To: weltyc@nisc.nyser.net (Christopher A. Welty) Organization: RPI Computer Science Dept. Lines: 33 In article <894@xn.LL.MIT.EDU> avi@XN.LL.MIT.EDU (Avi Weiss) writes: >Does anybody have a gnu-emacs macro that will copy a section of a >posting from point to mark, and insert the > (with a space) in front >of each line of the copied message? > I use this quite a lot. In addition to what you requested it also does a "fill" on the quoted text. I've found that inserting a > at the beginning of some messages causes it to go past the right margin which annoys me.... If you don't want it to fill, comment out the line indicated. I have it bound to ^C^Y in mail-mode-map. (defun mail-reply-yank (arg) "Yank the current msg in the rmail buffer, fill it properly, and insert\n the standard > before each line. CW 2/5/86" (interactive "P") (if mail-reply-buffer (let ((start (point))) (insert "\n") (insert-buffer mail-reply-buffer) (mail-yank-clear-headers start (mark)) (save-excursion ;comment this out if you don't want filled text. (fill-region (dot) (mark))) (while (not (eq (dot) (mark))) (let () (beginning-of-line) (insert "> ") (next-line 1)))))) Christopher Welty --- Asst. Director, RPI CS Labs weltyc@cs.rpi.edu ...!rutgers!nysernic!weltyc