diff options
author | darksun <lujun9972@gmail.com> | 2016-05-07 19:33:50 +0800 |
---|---|---|
committer | darksun <lujun9972@gmail.com> | 2016-05-07 19:33:50 +0800 |
commit | 0bd3eb08ed67771194a84ec89ce3bc00cc722618 (patch) | |
tree | e3458b421b11f2073c711c79ab30ddfc203e8d50 | |
parent | 981e0c7d19d4575d073b3a6bfb90526eeaf9384a (diff) |
`'s-format' tranform value to be string
-rw-r--r-- | s.el | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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) |