# HG changeset patch # User Richard M. Stallman # Date 1124967638 0 # Node ID c491b27f2b265d4762ad4bf6dbc0cb50505776f9 # Parent 0991b4a5145c923b238e2231d3d3fff28ba816c7 (build-mail-aliases): Delete comments from the contents before processing them. diff -r 0991b4a5145c -r c491b27f2b26 lisp/mail/mailalias.el --- 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))