summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarksun <lujun9972@gmail.com>2016-05-07 19:33:50 +0800
committerdarksun <lujun9972@gmail.com>2016-05-07 19:33:50 +0800
commit0bd3eb08ed67771194a84ec89ce3bc00cc722618 (patch)
treee3458b421b11f2073c711c79ab30ddfc203e8d50
parent981e0c7d19d4575d073b3a6bfb90526eeaf9384a (diff)
`'s-format' tranform value to be string
-rw-r--r--s.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/s.el b/s.el
index 75a12c4..c1ebd78 100644
--- a/s.el
+++ b/s.el
@@ -333,9 +333,7 @@ This is a simple wrapper around the built-in `string-match-p'."
(replace-regexp-in-string (regexp-quote old) new s t t))
(defun s--aget (alist key)
- (let ((result (cdr (assoc-string key alist))))
- (when result
- (format "%s" result))))
+ (cdr (assoc-string key alist)))
(defun s-replace-all (replacements s)
"REPLACEMENTS is a list of cons-cells. Each `car` is replaced with `cdr` in S."
@@ -560,7 +558,7 @@ transformation."
(if extra
(funcall replacer var extra)
(funcall replacer var))))))
- (if v v (signal 's-format-resolve md)))
+ (if v (format "%s" v) (signal 's-format-resolve md)))
(set-match-data replacer-match-data)))) template
;; Need literal to make sure it works
t t)