Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!shelby!bloom-beacon!eru!luth!sunic!tut!santra!kiravuo From: kiravuo@kampi.hut.fi (Timo Kiravuo) Newsgroups: gnu.emacs.gnus Subject: Re: yank indentation Message-ID: Date: 6 Oct 89 14:32:54 GMT References: Sender: news@santra.UUCP Distribution: gnu Organization: Helsinki University of Technology, Computing Center Lines: 41 In-reply-to: etxkrjg@solsta.ericsson.se's message of 5 Oct 89 17:03:26 GMT In article etxkrjg@solsta.ericsson.se (Kristian Jorg) writes: >The version of GNUS I have (3.12) does not yank messages into >the replies I make, in a nice way. ^ This does. I don't remember where I found this code, but it works. Don't know why, either. Put it in your .emacs file. (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 "")))) ))) -- Timo Kiravuo Helsinki University of Technology, Computing Center work: 90-451 4328, home: 90-676 076 kiravuo@hut.fi sorvi::kiravuo kiravuo%hut.fi@uunet.uu.net