]> code.delx.au - gnu-emacs/commitdiff
(rmail-copy-headers): Doc fix. Leave point at the end
authorGlenn Morris <rgm@gnu.org>
Tue, 27 Jan 2009 08:29:35 +0000 (08:29 +0000)
committerGlenn Morris <rgm@gnu.org>
Tue, 27 Jan 2009 08:29:35 +0000 (08:29 +0000)
of the headers in the full header case.  (Bug#2073)

lisp/ChangeLog
lisp/mail/rmail.el

index d211dfd4269161f83fc8a7c398217f647de3225a..3e8a1200ec8a4e2ec18fdf86c80c2d894cc11a3e 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-27  Glenn Morris  <rgm@gnu.org>
+
+       * mail/rmail.el (rmail-copy-headers): Doc fix.  Leave point at the end
+       of the headers in the full header case.  (Bug#2073)
+
 2009-01-27  Kenichi Handa  <handa@m17n.org>
 
        * mail/rmail.el (rmail-get-coding-system): Re-search
index 4662c4c32a089cfe3073b179bc5ae62f63f1d165..2ce7721735ee21b87bb0c9e8e607798578675394 100644 (file)
@@ -2563,7 +2563,8 @@ Otherwise, if `rmail-displayed-headers' is non-nil, copy only
 those header fields whose names match that regexp.  Otherwise,
 copy all header fields whose names do not match
 `rmail-ignored-headers' (unless they also match
-`rmail-nonignored-headers')."
+`rmail-nonignored-headers').  Leaves point in the message viewer
+buffer at the end of the headers."
   (let ((header-start-regexp "\n[^ \t]")
        lim)
     (with-current-buffer rmail-buffer
@@ -2579,8 +2580,12 @@ copy all header fields whose names do not match
          (cond
           ;; Handle the case where all headers should be copied.
           ((eq rmail-header-style 'full)
-           (prepend-to-buffer rmail-view-buffer beg (point-max)))
-          ;; Handle the case where the headers matching the diplayed
+           (prepend-to-buffer rmail-view-buffer beg (point-max))
+           ;; rmail-show-message expects this function to leave point
+           ;; at the end of the headers.
+           (with-current-buffer rmail-view-buffer
+             (search-forward "\n\n" nil t)))
+          ;; Handle the case where the headers matching the displayed
           ;; headers regexp should be copied.
           ((and rmail-displayed-headers (null ignored-headers))
            (while (not (eobp))