Mercurial > emacs
changeset 9425:7d0509b6f039
(mail-hist-put-headers-into-history)
(mail-hist-current-header-contents, mail-hist-forward-header)
(mail-hist-current-header-name):
Use regexp-quote on mail-header-separator.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 11 Oct 1994 00:35:42 +0000 |
parents | 738999b0296f |
children | 4dd2d351ea53 |
files | lisp/mail/mail-hist.el |
diffstat | 1 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/mail-hist.el Mon Oct 10 21:54:32 1994 +0000 +++ b/lisp/mail/mail-hist.el Tue Oct 11 00:35:42 1994 +0000 @@ -99,12 +99,15 @@ Returns nil if not in a header, implying that point is in the body of the message." (if (save-excursion - (re-search-backward (concat "^" mail-header-separator) nil t)) + (re-search-backward (concat "^" (regexp-quote mail-header-separator)) + nil t)) nil ; then we are in the body of the message (save-excursion (let* ((body-start ; limit possibility of false headers (save-excursion - (re-search-forward (concat "^" mail-header-separator) nil t))) + (re-search-forward + (concat "^" (regexp-quote mail-header-separator)) + nil t))) (name-start (re-search-backward mail-hist-header-regexp nil t)) (name-end @@ -123,7 +126,9 @@ colon after the header name, or on the second space following that if the header is empty." (let ((boundary (save-excursion - (re-search-forward (concat "^" mail-header-separator) nil t)))) + (re-search-forward + (concat "^" (regexp-quote mail-header-separator)) + nil t)))) (and boundary (let ((unstopped t)) @@ -168,7 +173,8 @@ (mail-hist-beginning-of-header) (let ((start (point))) (or (mail-hist-forward-header 1) - (re-search-forward (concat "^" mail-header-separator))) + (re-search-forward + (concat "^" (regexp-quote mail-header-separator)))) (beginning-of-line) (buffer-substring start (1- (point)))))) @@ -212,7 +218,9 @@ (let ((body-contents (save-excursion (goto-char (point-min)) - (re-search-forward (concat "^" mail-header-separator) nil) + (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)))))