1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-15 17:00:26 +00:00

(build-mail-aliases): Don't allow

a newline in the alias name.  Don't define an alias
if the definition would be empty.
This commit is contained in:
Karl Heuer 1998-09-30 19:16:47 +00:00
parent 2b7b0d1585
commit c051dfe5ce

View File

@ -282,14 +282,14 @@ By default, this is the file specified by `mail-personal-alias-file'."
(t (setq file nil))))
(goto-char (point-min))
(while (re-search-forward
"^\\(a\\|alias\\|g\\|group\\)[ \t]+\\([^ \t]+\\)" nil t)
"^\\(a\\|alias\\|g\\|group\\)[ \t]+\\([^ \t\n]+\\)" nil t)
(let* ((name (match-string 2))
(start (progn (skip-chars-forward " \t") (point))))
(start (progn (skip-chars-forward " \t") (point)))
value)
(end-of-line)
(define-mail-alias
name
(buffer-substring-no-properties start (point))
t)))
(setq value (buffer-substring-no-properties start (point)))
(unless (equal value "")
(define-mail-alias name value t))))
mail-aliases)
(if buffer (kill-buffer buffer))
(set-buffer obuf))))