Subject: [PATCH 2/2] * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Right-trim name.

From: Jonas Bernoulli <[email-masked]>
Date: Sat, 22 May 2021 22:32:50 +0200

The addresses might be aligned in which case we have to trim the
extra whitespace at the end of the names.
---
 lisp/emacs-lisp/lisp-mnt.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index 25b5e8c5bd..a73c53def4 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -360,10 +360,10 @@ lm-crack-address
   "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))
-- 
2.30.1