bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rmail: customize replying


From: Ilya N. Golubev
Subject: rmail: customize replying
Date: Thu, 27 May 2004 22:03:38 +0400

Long (see date in patch) outstanding patches to `EMACS_21_1_RC' cvs
branch.

        * rmail.el (rmail-make-in-reply-to-field): make adding fields
        that are not message id user customizable.
        * rmail.el (rmail-reply, rmail-forward): Make stripping
        non-address information from address fields user customizable.

Index: rmail.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mail/rmail.el,v
retrieving revision 1.349.4.5
diff -u -r1.349.4.5 rmail.el
--- rmail.el    6 Jul 2002 14:17:02 -0000       1.349.4.5
+++ rmail.el    5 Sep 2002 10:26:06 -0000
@@ -3074,6 +3074,15 @@
   (interactive)
   (rmail-start-mail t))
 
+(defvar rmail-reply-strip-quoted-names t
+  "*Whether to put only addresses into reply message, stripping other
+data from fields of message being replied to.")
+
+(defsubst rmail-strip-quoted-names (field)
+  (if rmail-reply-strip-quoted-names
+      (mail-strip-quoted-names field)
+    field))
+
 (defun rmail-reply (just-sender)
   "Reply to the current message.
 Normally include CC: to all other recipients of original message;
@@ -3145,7 +3154,7 @@
      ;; since they can handle the names unstripped.
      ;; I don't know whether there are other mailers that still
      ;; need the names to be stripped.
-     (mail-strip-quoted-names reply-to)
+     (rmail-strip-quoted-names reply-to)
      subject
      (rmail-make-in-reply-to-field from date message-id)
      (if just-sender
@@ -3153,7 +3162,7 @@
        ;; mail-strip-quoted-names is NOT necessary for rmail-dont-reply-to
        ;; to do its job.
        (let* ((cc-list (rmail-dont-reply-to
-                       (mail-strip-quoted-names
+                       (rmail-strip-quoted-names
                         (if (null cc) to (concat to ", " cc))))))
         (if (string= cc-list "") nil cc-list)))
      rmail-view-buffer
@@ -3176,8 +3185,12 @@
     (if (car msgnum-list)
        (rmail-set-attribute attribute t (car msgnum-list)))))
 
+(defvar rmail-just-message-id nil
+  "*Non-nil inhibits putting additional stuff into in-reply-to
+field.")
+
 (defun rmail-make-in-reply-to-field (from date message-id)
-  (cond ((not from)
+  (cond ((or (not from) rmail-just-message-id)
          (if message-id
              message-id
              nil))
@@ -3248,7 +3261,7 @@
                           (let ((from (or (mail-fetch-field "From")
                                           (mail-fetch-field ">From"))))
                             (if from
-                                (concat (mail-strip-quoted-names from) ": ")
+                                (concat (rmail-strip-quoted-names from) ": ")
                               ""))
                           (or (mail-fetch-field "Subject") "")
                           "]")))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]