emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r110071: message-in-body-p should not


From: Richard Stallman
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110071: message-in-body-p should not alter anything.
Date: Mon, 17 Sep 2012 07:41:39 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110071
committer: Richard Stallman <address@hidden>
branch nick: trunk
timestamp: Mon 2012-09-17 07:41:39 -0400
message:
  message-in-body-p should not alter anything.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/message.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2012-09-17 11:39:41 +0000
+++ b/lisp/gnus/ChangeLog       2012-09-17 11:41:39 +0000
@@ -1,5 +1,7 @@
 2012-09-17  Richard Stallman  <address@hidden>
 
+       * message.el (message-in-body-p): Don't set mark or modify buffer.
+
        * mml.el (mml-attach-file): Doc fix.
        (mml-attach-external, mml-attach-buffer, mml-attach-file):
        Set mail-encode-mml when in Mail mode.

=== modified file 'lisp/gnus/message.el'
--- a/lisp/gnus/message.el      2012-09-05 22:35:32 +0000
+++ b/lisp/gnus/message.el      2012-09-17 11:41:39 +0000
@@ -3160,8 +3160,12 @@
 
 (defun message-in-body-p ()
   "Return t if point is in the message body."
-  (let ((body (save-excursion (message-goto-body))))
-    (>= (point) body)))
+  (>= (point)
+      (save-excursion
+       (goto-char (point-min))
+       (or (search-forward (concat "\n" mail-header-separator "\n") nil t)
+           (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t))
+       (point))))
 
 (defun message-goto-eoh ()
   "Move point to the end of the headers."


reply via email to

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