home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.emacs,cs.emacs
- Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!nntp!raivio
- From: raivio@niksula.hut.fi (Perttu Raivio)
- Subject: Re: Is there a way to get RMAIL to behave like this:
- In-Reply-To: ericg@bronze.ucs.indiana.edu's message of Fri, 24 Jul 92 14:22:45 GMT
- Message-ID: <RAIVIO.92Jul27112202@hydroman.hut.FI>
- Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
- Nntp-Posting-Host: hydroman.cs.hut.fi
- Organization: BREWTeX - Wine, women and song
- References: <1992Jul24.142245.9472@bronze.ucs.indiana.edu>
- Date: 27 Jul 92 11:22:02
- Lines: 46
-
- In article <1992Jul24.142245.9472@bronze.ucs.indiana.edu> ericg@bronze.ucs.indiana.edu (E. Chris Garrison) writes:
- >
- > Easy enough. Not so in RMAIL, replying does not include
- > text, and I can't get regexp-replace to do the above replace.
-
- The inclusion, as others havo pointed out, is done with C-c
- C-y. To change the indentation you can use the following piece of
- elisp code which will do the job automatically:
-
- --- cut --- cut --- cut --- cut --- cut --- cut ---
-
- ;; Mail yank indention with "> "
-
- (setq mail-setup-hook
- (setq news-reply-mode-hook
- '(lambda ()
- (defvar mail-yank-indent-string "> ")
-
- (defun mail-yank-original (arg)
- (interactive "P")
- (if mail-reply-buffer
- (let ((start (point)))
- (delete-windows-on mail-reply-buffer)
- (insert-buffer mail-reply-buffer)
- (mail-yank-clear-headers start (mark))
- (mail-yank-indent start)
- (exchange-point-and-mark)
- (if (not (eolp)) (insert ?\n)))))
-
- (defun mail-yank-indent (start)
- (save-excursion
- (goto-char start)
- (while (re-search-forward "^" (point-max) t)
- (replace-match mail-yank-indent-string))
- (goto-char start)
- (while (re-search-forward
- (concat "^" mail-yank-indent-string "[ \t]*$")
- (point-max) t)
- (replace-match "")))) )))
-
- --- cut --- cut --- cut --- cut --- cut --- cut ---
-
- --
-
- K.P.Raivio - Helsinki U of T - raivio@niksula.hut.fi
- Ei fl|ittej{, ei niin dzoukin p{tk{{k{{n...
-