emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp/mail rmail.el


From: Glenn Morris
Subject: [Emacs-diffs] emacs/lisp/mail rmail.el
Date: Sat, 31 Jan 2009 02:51:18 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       09/01/31 02:51:18

Modified files:
        lisp/mail      : rmail.el 

Log message:
        (rmail-msg-is-pruned): New (restored) function.
        (rmail-toggle-header): Doc fix.  Use rmail-msg-is-pruned.
        (rmail-reply): Set up to yank from the decoded message rather than the
        raw one.  (Bug#2104).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/rmail.el?cvsroot=emacs&r1=1.483&r2=1.484

Patches:
Index: rmail.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/rmail.el,v
retrieving revision 1.483
retrieving revision 1.484
diff -u -b -r1.483 -r1.484
--- rmail.el    30 Jan 2009 18:29:48 -0000      1.483
+++ rmail.el    31 Jan 2009 02:51:18 -0000      1.484
@@ -2353,18 +2353,22 @@
 
 ;;;; *** Rmail Message Formatting and Header Manipulation ***
 
+;; This is used outside of rmail.
+(defun rmail-msg-is-pruned ()
+  "Return nil if the current message is showing full headers."
+  (with-current-buffer (if (rmail-buffers-swapped-p) rmail-view-buffer
+                         rmail-buffer)
+    (eq rmail-header-style 'normal)))
+
 (defun rmail-toggle-header (&optional arg)
-  "Show original message header if pruned header currently shown, or vice 
versa.
-With argument ARG, show the message header pruned if ARG is greater than zero;
-otherwise, show it in full."
+  "Toggle between showing full and normal message headers.
+With optional integer ARG, show the normal message header if ARG
+is greater than zero; otherwise, show it in full."
   (interactive "P")
   (let ((rmail-header-style
         (if (numberp arg)
             (if (> arg 0) 'normal 'full)
-          (with-current-buffer (if (rmail-buffers-swapped-p)
-                                   rmail-view-buffer
-                                 rmail-buffer)
-            (if (eq rmail-header-style 'full) 'normal 'full)))))
+           (if (rmail-msg-is-pruned) 'full 'normal))))
     (rmail-show-message-maybe)))
 
 (defun rmail-beginning-of-message ()
@@ -3367,7 +3371,9 @@
                        (mail-strip-quoted-names
                         (if (null cc) to (concat to ", " cc))))))
         (if (string= cc-list "") nil cc-list)))
-     rmail-view-buffer
+     (if (rmail-buffers-swapped-p)
+        rmail-buffer
+       rmail-view-buffer)
      (list (list 'rmail-mark-message
                 rmail-buffer
                 (with-current-buffer rmail-buffer




reply via email to

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