diff options
| author | Richard M. Stallman | 1994-07-12 02:16:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-07-12 02:16:57 +0000 |
| commit | 8eb6c7da6ba209c2ff031297e55ef54a6b256e16 (patch) | |
| tree | d53f3f475fa3cc10951d0df9643274fea8e0e1ae | |
| parent | e85051798a4dfe750a82d0f0be86138d1ddf4dbb (diff) | |
| download | emacs-8eb6c7da6ba209c2ff031297e55ef54a6b256e16.tar.gz emacs-8eb6c7da6ba209c2ff031297e55ef54a6b256e16.zip | |
(define-mail-abbrev): Don't try to parse empty aliases.
| -rw-r--r-- | lisp/mail/mailabbrev.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index ec7ba01b2a2..3b3f9a5198e 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el | |||
| @@ -254,10 +254,10 @@ If DEFINITION contains multiple addresses, separate them with commas." | |||
| 254 | (setq definition (substring definition (match-end 0)))) | 254 | (setq definition (substring definition (match-end 0)))) |
| 255 | (if (string-match "[ \t\n,]+\\'" definition) | 255 | (if (string-match "[ \t\n,]+\\'" definition) |
| 256 | (setq definition (substring definition 0 (match-beginning 0)))) | 256 | (setq definition (substring definition 0 (match-beginning 0)))) |
| 257 | (let ((result '()) | 257 | (let* ((result '()) |
| 258 | (start 0) | 258 | (L (length definition)) |
| 259 | (L (length definition)) | 259 | (start (if (> L 0) 0)) |
| 260 | end) | 260 | end) |
| 261 | (while start | 261 | (while start |
| 262 | ;; If we're reading from the mailrc file, then addresses are delimited | 262 | ;; If we're reading from the mailrc file, then addresses are delimited |
| 263 | ;; by spaces, and addresses with embedded spaces must be surrounded by | 263 | ;; by spaces, and addresses with embedded spaces must be surrounded by |
| @@ -266,8 +266,8 @@ If DEFINITION contains multiple addresses, separate them with commas." | |||
| 266 | (if (eq ?\" (aref definition start)) | 266 | (if (eq ?\" (aref definition start)) |
| 267 | (setq start (1+ start) | 267 | (setq start (1+ start) |
| 268 | end (string-match "\"[ \t,]*" definition start)) | 268 | end (string-match "\"[ \t,]*" definition start)) |
| 269 | (setq end (string-match "[ \t,]+" definition start))) | 269 | (setq end (string-match "[ \t,]+" definition start))) |
| 270 | (setq end (string-match "[ \t\n,]*,[ \t\n,]*" definition start))) | 270 | (setq end (string-match "[ \t\n,]*,[ \t\n,]*" definition start))) |
| 271 | (setq result (cons (substring definition start end) result)) | 271 | (setq result (cons (substring definition start end) result)) |
| 272 | (setq start (and end | 272 | (setq start (and end |
| 273 | (/= (match-end 0) L) | 273 | (/= (match-end 0) L) |