From: Richard M. Stallman Date: Tue, 11 Apr 1995 23:01:05 +0000 (+0000) Subject: (mail-hist-put-headers-into-history): X-Git-Tag: emacs-19.34~4481 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=019434e1f3ee1db8e3577320980d2a8b1d09ba51;p=emacs.git (mail-hist-put-headers-into-history): Add save-excursion around entire function. --- diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el index 6a80398fd46..e0608a4cefd 100644 --- a/lisp/mail/mail-hist.el +++ b/lisp/mail/mail-hist.el @@ -210,19 +210,19 @@ message. This function normally would be called when the message is sent." (and mail-hist-keep-history - (progn + (save-excursion (goto-char (point-min)) (while (mail-hist-forward-header 1) (mail-hist-add-header-contents-to-ring (mail-hist-current-header-name))) (let ((body-contents (save-excursion - (goto-char (point-min)) - (re-search-forward - (concat "^" (regexp-quote mail-header-separator) "$") - nil) - (forward-line 1) - (buffer-substring (point) (point-max))))) + (goto-char (point-min)) + (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "$") + nil) + (forward-line 1) + (buffer-substring (point) (point-max))))) (mail-hist-add-header-contents-to-ring "body" body-contents))))) (defun mail-hist-previous-input (header)