# HG changeset patch # User Richard M. Stallman # Date 773979417 0 # Node ID 767bef8ec35bad361364ecfa7f8a0700e2eb2411 # Parent a13093894b9ae872724631fb6caa10bc8270e705 (define-mail-abbrev): Don't try to parse empty aliases. diff -r a13093894b9a -r 767bef8ec35b lisp/mail/mailabbrev.el --- a/lisp/mail/mailabbrev.el Tue Jul 12 02:10:57 1994 +0000 +++ b/lisp/mail/mailabbrev.el Tue Jul 12 02:16:57 1994 +0000 @@ -254,10 +254,10 @@ (setq definition (substring definition (match-end 0)))) (if (string-match "[ \t\n,]+\\'" definition) (setq definition (substring definition 0 (match-beginning 0)))) - (let ((result '()) - (start 0) - (L (length definition)) - end) + (let* ((result '()) + (L (length definition)) + (start (if (> L 0) 0)) + end) (while start ;; If we're reading from the mailrc file, then addresses are delimited ;; by spaces, and addresses with embedded spaces must be surrounded by @@ -266,8 +266,8 @@ (if (eq ?\" (aref definition start)) (setq start (1+ start) end (string-match "\"[ \t,]*" definition start)) - (setq end (string-match "[ \t,]+" definition start))) - (setq end (string-match "[ \t\n,]*,[ \t\n,]*" definition start))) + (setq end (string-match "[ \t,]+" definition start))) + (setq end (string-match "[ \t\n,]*,[ \t\n,]*" definition start))) (setq result (cons (substring definition start end) result)) (setq start (and end (/= (match-end 0) L)