changeset 11249:19442fbb6972

Use $ at end when searching for mail-header-separator.
author Richard M. Stallman <rms@gnu.org>
date Fri, 07 Apr 1995 06:36:45 +0000
parents 23dc83e963f6
children 9ccb4577abd6
files lisp/mail/mail-hist.el
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mail-hist.el	Fri Apr 07 06:30:40 1995 +0000
+++ b/lisp/mail/mail-hist.el	Fri Apr 07 06:36:45 1995 +0000
@@ -3,7 +3,6 @@
 
 ;; Author: Karl Fogel <kfogel@cs.oberlin.edu>
 ;; Created: March, 1994
-;; Version: 1.3
 ;; Keywords: mail, history
 
 ;; This file is part of GNU Emacs.
@@ -99,14 +98,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 "^" (regexp-quote mail-header-separator))
+        (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 "^" (regexp-quote mail-header-separator))
+		 (concat "^" (regexp-quote mail-header-separator) "$")
 		 nil t)))
              (name-start
               (re-search-backward mail-hist-header-regexp nil t))
@@ -127,7 +127,7 @@
 the header is empty."
   (let ((boundary (save-excursion
 		    (re-search-forward
-		     (concat "^" (regexp-quote mail-header-separator))
+		     (concat "^" (regexp-quote mail-header-separator) "$")
 		     nil t))))
     (and
      boundary
@@ -174,7 +174,7 @@
     (let ((start (point)))
       (or (mail-hist-forward-header 1)
           (re-search-forward
-	   (concat "^" (regexp-quote mail-header-separator))))
+	   (concat "^" (regexp-quote mail-header-separator) "$")))
       (beginning-of-line)
       (buffer-substring start (1- (point))))))
 
@@ -219,7 +219,7 @@
             (save-excursion
             (goto-char (point-min))
             (re-search-forward
-	     (concat "^" (regexp-quote mail-header-separator))
+	     (concat "^" (regexp-quote mail-header-separator) "$")
 	     nil)
             (forward-line 1)
             (buffer-substring (point) (point-max)))))