summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mnt.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2021-05-22 21:58:53 +0200
committerJonas Bernoulli <jonas@bernoul.li>2021-06-30 19:50:54 +0200
commit0e3668b23323de130d6d8cda70c4669a4b7aa2f3 (patch)
tree365d257e7e6928cafed3b6cd70c1f651fc64e755 /lisp/emacs-lisp/lisp-mnt.el
parent1439e9bfadb2ba66f55530daab1f9886c7a98c02 (diff)
downloademacs-0e3668b23323de130d6d8cda70c4669a4b7aa2f3.tar.gz
emacs-0e3668b23323de130d6d8cda70c4669a4b7aa2f3.tar.bz2
emacs-0e3668b23323de130d6d8cda70c4669a4b7aa2f3.zip
* 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.
Diffstat (limited to 'lisp/emacs-lisp/lisp-mnt.el')
-rw-r--r--lisp/emacs-lisp/lisp-mnt.el4
1 files changed, 2 insertions, 2 deletions
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))