From: Jonas Bernoulli Date: Sat, 22 May 2021 19:58:53 +0000 (+0200) Subject: * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Right-trim name. X-Git-Tag: emacs-28.0.90~1999 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0e3668b23323de130d6d8cda70c4669a4b7aa2f3;p=emacs.git * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Right-trim name. The addresses might be aligned in which case we have to trim the extra whitespace at the end of the names. --- diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 73a33a553fb..11a04400877 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -360,10 +360,10 @@ Return argument is of the form (\"HOLDER\" \"YEAR1\" ... \"YEARN\")" "Split up an email address X into full name and real email address. The value is a cons of the form (FULLNAME . ADDRESS)." (cond ((string-match "\\(.+\\) [(<]\\(\\S-+@\\S-+\\)[>)]" x) - (cons (match-string 1 x) + (cons (string-trim-right (match-string 1 x)) (match-string 2 x))) ((string-match "\\(\\S-+@\\S-+\\) [(<]\\(.*\\)[>)]" x) - (cons (match-string 2 x) + (cons (string-trim-right (match-string 2 x)) (match-string 1 x))) ((string-match "\\S-+@\\S-+" x) (cons nil x))