From 728fe976456052c7d8b8a57367c135ab7182f0b3 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 16 Mar 2009 15:47:36 +0000 Subject: [PATCH] emacs: Fix email/news quoting. The Message mode's default quoting is `> ' except for blank and quoted lines, which get `>'. This is right for blank lines (avoids trailing spaces), but is wrong for quoted lines. So, hacketty hack, we fix it to use `> ' for everything and trim off trailing spaces manually. --- emacs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/emacs b/emacs index dcb561d..2d0aaff 100644 --- a/emacs +++ b/emacs @@ -121,7 +121,18 @@ (setq sendmail-program "~/bin/sendmail-hack") (setq mail-user-agent 'message-user-agent) -(setq message-signature-separator "^-- \\(\\|\\[mdw\\]\\)$") +(setq message-signature-separator "^-- \\(\\|\\[mdw\\]\\)$" + message-yank-prefix "> " + message-yank-cited-prefix "> " + message-indent-citation-function '(message-indent-citation + mdw-trim-spaces-after-citing)) + +(defun mdw-trim-spaces-after-citing () + (save-excursion + (save-restriction + (narrow-to-region (point) (mark t)) + (while (re-search-forward "^> +$" nil t) + (replace-match ">"))))) (and (fboundp 'turn-on-gnus-dired-mode) (not mdw-fast-startup) -- 2.11.0