emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/ebdb ff0d949 5/6: Allow numbers in mail names


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb ff0d949 5/6: Allow numbers in mail names
Date: Thu, 7 Nov 2019 18:12:42 -0500 (EST)

branch: externals/ebdb
commit ff0d94993256cc62aaa999c0937e2dcf06986057
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Allow numbers in mail names
    
    * ebdb.el (ebdb-message-clean-name-default): Don't remove numbers from
    mail names. Plenty of valid mail addresses have numbers in the "name"
    part.
---
 ebdb.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ebdb.el b/ebdb.el
index a139bd4..b7ae6e3 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -4729,8 +4729,8 @@ be taken as a source of inspiration for what's possible."
 (defun ebdb-message-clean-name-default (name)
   "Default function for `ebdb-message-clean-name-function'.
 This strips garbage from the user full NAME string."
-  ;; Remove leading non-alpha chars
-  (if (string-match "\\`[^[:alpha:]]+" name)
+  ;; Remove leading non-alphanumeric chars
+  (if (string-match "\\`[^[:alnum:]]+" name)
       (setq name (substring name (match-end 0))))
 
   (if (string-match "^\\([^@]+\\)@" name)
@@ -4756,8 +4756,8 @@ This strips garbage from the user full NAME string."
     (setq name (replace-regexp-in-string
                 "\\W+\\(x\\|ext\\.?\\)\\W*[-0-9]+" "" name)))
 
-  ;; Remove trailing non-alpha chars
-  (if (string-match "[^[:alpha:]]+\\'" name)
+  ;; Remove trailing non-alphanumeric chars
+  (if (string-match "[^[:alnum:]]+\\'" name)
       (setq name (substring name 0 (match-beginning 0))))
 
   ;; Remove text properties



reply via email to

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