branch: externals/ebdb
commit 5624e58f715bb63f1367c2912d98a8cc3204bf85
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
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))