(build-mail-aliases): Delete comments
from the contents before processing them.
This commit is contained in:
parent
1eedd2f11f
commit
1296b4cdd9
1 changed files with 6 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue