emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0e3668b 1/2: * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Ri


From: Jonas Bernoulli
Subject: master 0e3668b 1/2: * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Right-trim name.
Date: Wed, 30 Jun 2021 13:56:59 -0400 (EDT)

branch: master
commit 0e3668b23323de130d6d8cda70c4669a4b7aa2f3
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    * 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.
---
 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 73a33a5..11a0440 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]