summaryrefslogtreecommitdiff
path: root/lisp/mail/mailalias.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1998-09-30 19:16:47 +0000
committerKarl Heuer <kwzh@gnu.org>1998-09-30 19:16:47 +0000
commitc051dfe5ce67c214692b6e55b647eeabcaf5115f (patch)
tree1d0df88754f285298b831eb858ea57bf9fa76dab /lisp/mail/mailalias.el
parent2b7b0d15850f0b42ce5ffe8947bfd82edb745464 (diff)
downloademacs-c051dfe5ce67c214692b6e55b647eeabcaf5115f.tar.gz
(build-mail-aliases): Don't allow
a newline in the alias name. Don't define an alias if the definition would be empty.
Diffstat (limited to 'lisp/mail/mailalias.el')
-rw-r--r--lisp/mail/mailalias.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index fec940c7254..f40c460e034 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -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))))