diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-08-25 11:00:38 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-08-25 11:00:38 +0000 |
commit | 1296b4cdd99217bbdb34023e92136985c8275ea7 (patch) | |
tree | 3f022969e5d7b57e6d9d3578ae7cfb3722234a7e /lisp/mail/mailalias.el | |
parent | 1eedd2f11f54db9ccc9a9b6cae639f65750b8baf (diff) | |
download | emacs-1296b4cdd99217bbdb34023e92136985c8275ea7.tar.gz |
(build-mail-aliases): Delete comments
from the contents before processing them.
Diffstat (limited to 'lisp/mail/mailalias.el')
-rw-r--r-- | lisp/mail/mailalias.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el index 56882f04eb5..48f3494a0e6 100644 --- a/lisp/mail/mailalias.el +++ b/lisp/mail/mailalias.el @@ -262,6 +262,12 @@ By default, this is the file specified by `mail-personal-alias-file'." ((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)) |