changeset 101535:8b115b281787

(rmail-message-recipients-p-1, rmail-message-regexp-p-1): Avoid clobbering the mark.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 27 Jan 2009 03:15:52 +0000
parents 4ec17a20d09e
children a8fcffcd20d5
files lisp/mail/rmailsum.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Tue Jan 27 03:15:14 2009 +0000
+++ b/lisp/mail/rmailsum.el	Tue Jan 27 03:15:52 2009 +0000
@@ -113,7 +113,7 @@
 			  recipients primary-only))
 
 (defun rmail-message-recipients-p-1 (recipients &optional primary-only)
-  (narrow-to-region (point) (progn (search-forward "\n\n") (point)))
+  (narrow-to-region (point) (save-excursion (search-forward "\n\n") (point)))
   (or (string-match recipients (or (mail-fetch-field "To") ""))
       (string-match recipients (or (mail-fetch-field "From") ""))
       (if (not primary-only)
@@ -140,7 +140,7 @@
   (rmail-apply-in-message msg 'rmail-message-regexp-p-1 msg regexp))
 
 (defun rmail-message-regexp-p-1 (msg regexp)
-  (narrow-to-region (point) (progn (search-forward "\n\n") (point)))
+  (narrow-to-region (point) (save-excursion (search-forward "\n\n") (point)))
   (if rmail-enable-mime
       (funcall rmail-search-mime-header-function msg regexp (point))
     (re-search-forward regexp nil t)))