mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-03 11:33:37 +00:00
(define-mail-alias): Compensate for not resetting the match data when
string-match fails.
This commit is contained in:
parent
b44c3d59fa
commit
8332fa80b6
@ -334,10 +334,14 @@ if it is quoted with double-quotes."
|
||||
;; double-quotes. Otherwise, addresses are separated by commas.
|
||||
(if from-mailrc-file
|
||||
(if (eq ?\" (aref definition start))
|
||||
(progn (string-match "[^\\]\\(\\([\\][\\]\\)*\\)\"[ \t,]*" definition start)
|
||||
(setq start (1+ start)
|
||||
end (match-end 1)
|
||||
convert-backslash t))
|
||||
;; The following test on `found' compensates for a bug
|
||||
;; in match-end, which does not return nil when match
|
||||
;; failed.
|
||||
(let ((found (string-match "[^\\]\\(\\([\\][\\]\\)*\\)\"[ \t,]*"
|
||||
definition start)))
|
||||
(setq start (1+ start)
|
||||
end (and found (match-end 1))
|
||||
convert-backslash t))
|
||||
(setq end (string-match "[ \t,]+" definition start)))
|
||||
(setq end (string-match "[ \t\n,]*,[ \t\n,]*" definition start)))
|
||||
(let ((temp (substring definition start end))
|
||||
|
Loading…
Reference in New Issue
Block a user