summaryrefslogtreecommitdiff
path: root/lisp/mail/mailalias.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail/mailalias.el')
-rw-r--r--lisp/mail/mailalias.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index 55c284dda7d..48f3494a0e6 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -1,6 +1,7 @@
;;; mailalias.el --- expand and complete mailing address aliases
-;; Copyright (C) 1985, 1987, 1995, 1996, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1995, 1996, 1997, 2002, 2003,
+;; 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
@@ -261,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))