diff options
| author | Karl Heuer | 1998-09-30 19:16:47 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-09-30 19:16:47 +0000 |
| commit | c051dfe5ce67c214692b6e55b647eeabcaf5115f (patch) | |
| tree | 1d0df88754f285298b831eb858ea57bf9fa76dab | |
| parent | 2b7b0d15850f0b42ce5ffe8947bfd82edb745464 (diff) | |
| download | emacs-c051dfe5ce67c214692b6e55b647eeabcaf5115f.tar.gz emacs-c051dfe5ce67c214692b6e55b647eeabcaf5115f.zip | |
(build-mail-aliases): Don't allow
a newline in the alias name. Don't define an alias
if the definition would be empty.
| -rw-r--r-- | lisp/mail/mailalias.el | 12 |
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'." | |||
| 282 | (t (setq file nil)))) | 282 | (t (setq file nil)))) |
| 283 | (goto-char (point-min)) | 283 | (goto-char (point-min)) |
| 284 | (while (re-search-forward | 284 | (while (re-search-forward |
| 285 | "^\\(a\\|alias\\|g\\|group\\)[ \t]+\\([^ \t]+\\)" nil t) | 285 | "^\\(a\\|alias\\|g\\|group\\)[ \t]+\\([^ \t\n]+\\)" nil t) |
| 286 | (let* ((name (match-string 2)) | 286 | (let* ((name (match-string 2)) |
| 287 | (start (progn (skip-chars-forward " \t") (point)))) | 287 | (start (progn (skip-chars-forward " \t") (point))) |
| 288 | value) | ||
| 288 | (end-of-line) | 289 | (end-of-line) |
| 289 | (define-mail-alias | 290 | (setq value (buffer-substring-no-properties start (point))) |
| 290 | name | 291 | (unless (equal value "") |
| 291 | (buffer-substring-no-properties start (point)) | 292 | (define-mail-alias name value t)))) |
| 292 | t))) | ||
| 293 | mail-aliases) | 293 | mail-aliases) |
| 294 | (if buffer (kill-buffer buffer)) | 294 | (if buffer (kill-buffer buffer)) |
| 295 | (set-buffer obuf)))) | 295 | (set-buffer obuf)))) |