changeset 101564:fe1cbb7012eb

(rmail-copy-headers): Doc fix. Leave point at the end of the headers in the full header case. (Bug#2073)
author Glenn Morris <rgm@gnu.org>
date Tue, 27 Jan 2009 08:29:35 +0000
parents 1bd3a37d9129
children cfd4693e503b
files lisp/ChangeLog lisp/mail/rmail.el
diffstat 2 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Jan 27 06:42:27 2009 +0000
+++ b/lisp/ChangeLog	Tue Jan 27 08:29:35 2009 +0000
@@ -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
--- a/lisp/mail/rmail.el	Tue Jan 27 06:42:27 2009 +0000
+++ b/lisp/mail/rmail.el	Tue Jan 27 08:29:35 2009 +0000
@@ -2563,7 +2563,8 @@
 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 @@
 	  (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))