Mercurial > emacs
changeset 23356:a05ab8915917
(build-mail-aliases): Don't allow
a newline in the alias name. Don't define an alias
if the definition would be empty.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 30 Sep 1998 19:16:47 +0000 |
parents | 4486a6940607 |
children | 856a82c440fa |
files | lisp/mail/mailalias.el |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/mailalias.el Wed Sep 30 19:15:56 1998 +0000 +++ b/lisp/mail/mailalias.el Wed Sep 30 19:16:47 1998 +0000 @@ -282,14 +282,14 @@ (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))))