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

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

[elpa] externals/ebdb 5624e58 1/6: Use apply instead of eval on phone nu


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 5624e58 1/6: Use apply instead of eval on phone number formatting
Date: Tue, 10 Jul 2018 16:20:18 -0400 (EDT)

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

    Use apply instead of eval on phone number formatting
    
    * ebdb.el (ebdb-string): There was no reason for this use of `eval'.
---
 ebdb.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/ebdb.el b/ebdb.el
index b4e67d0..d6ee0ec 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -1713,14 +1713,14 @@ The result looks like this:
       (when number
        (let ((numstring (split-string number "" t)))
          (push
-          (eval `(format ,(cl-case (length numstring)
-                           (7
-                            "%s%s%s-%s%s%s%s")
-                           (8
-                            "%s%s%s%s-%s%s%s%s")
-                           (t
-                            number))
-                         ,@numstring))
+          (apply #'format (cl-case (length numstring)
+                            (7
+                             "%s%s%s-%s%s%s%s")
+                            (8
+                             "%s%s%s%s-%s%s%s%s")
+                            (t
+                             number))
+                 numstring)
           outstring)))
       (when area-code
        (push (format "(%d) " area-code) outstring))



reply via email to

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