changeset 65117:c491b27f2b26

(build-mail-aliases): Delete comments from the contents before processing them.
author Richard M. Stallman <rms@gnu.org>
date Thu, 25 Aug 2005 11:00:38 +0000
parents 0991b4a5145c
children a7267c763125
files lisp/mail/mailalias.el
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mailalias.el	Thu Aug 25 10:58:57 2005 +0000
+++ b/lisp/mail/mailalias.el	Thu Aug 25 11:00:38 2005 +0000
@@ -262,6 +262,12 @@
 		  ((file-exists-p (setq file (concat "~/" file)))
 		   (insert-file-contents file))
 		  (t (setq file nil)))
+	    (goto-char (point-min))
+	    ;; Delete comments from the contents.
+	    (while (search-forward "# " nil t)
+	      (let ((p (- (point) 2)))
+		(end-of-line)
+		(delete-region p (point))))
 	    ;; Don't lose if no final newline.
 	    (goto-char (point-max))
 	    (or (eq (preceding-char) ?\n) (newline))