diff options
| author | Artur Malabarba | 2014-12-22 10:36:30 -0200 |
|---|---|---|
| committer | Artur Malabarba | 2014-12-22 10:36:30 -0200 |
| commit | 251463c60bfb49920bdaba828e650806682ddd63 (patch) | |
| tree | d07d92a183f42543ea061ffbfa7c4acbccd554f7 | |
| parent | 6f3f6050607cf64cb5728af1ff871b8c5e994661 (diff) | |
| download | emacs-251463c60bfb49920bdaba828e650806682ddd63.tar.gz emacs-251463c60bfb49920bdaba828e650806682ddd63.zip | |
let-alist.el (let-alist): Use `make-symbol' instead of `gensym'.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/let-alist.el | 4 | ||||
| -rw-r--r-- | test/automated/let-alist.el | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 436ac16d866..37fbc6a5185 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-12-22 Artur Malabarba <bruce.connor.am@gmail.com> | ||
| 2 | |||
| 3 | * let-alist.el (let-alist): Use `make-symbol' instead of `gensym'. | ||
| 4 | |||
| 1 | 2014-12-20 Michael Albinus <michael.albinus@gmx.de> | 5 | 2014-12-20 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 6 | ||
| 3 | * net/tramp-sh.el (tramp-histfile-override): Add :version. | 7 | * net/tramp-sh.el (tramp-histfile-override): Add :version. |
diff --git a/lisp/let-alist.el b/lisp/let-alist.el index 692beba16dd..7271e391f47 100644 --- a/lisp/let-alist.el +++ b/lisp/let-alist.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: Artur Malabarba <bruce.connor.am@gmail.com> | 5 | ;; Author: Artur Malabarba <bruce.connor.am@gmail.com> |
| 6 | ;; Maintainer: Artur Malabarba <bruce.connor.am@gmail.com> | 6 | ;; Maintainer: Artur Malabarba <bruce.connor.am@gmail.com> |
| 7 | ;; Version: 1.0.2 | 7 | ;; Version: 1.0.3 |
| 8 | ;; Keywords: extensions lisp | 8 | ;; Keywords: extensions lisp |
| 9 | ;; Prefix: let-alist | 9 | ;; Prefix: let-alist |
| 10 | ;; Separator: - | 10 | ;; Separator: - |
| @@ -131,7 +131,7 @@ the variables of the outer one. You can, however, access alists | |||
| 131 | inside the original alist by using dots inside the symbol, as | 131 | inside the original alist by using dots inside the symbol, as |
| 132 | displayed in the example above." | 132 | displayed in the example above." |
| 133 | (declare (indent 1) (debug t)) | 133 | (declare (indent 1) (debug t)) |
| 134 | (let ((var (gensym "alist"))) | 134 | (let ((var (make-symbol "alist"))) |
| 135 | `(let ((,var ,alist)) | 135 | `(let ((,var ,alist)) |
| 136 | (let ,(mapcar (lambda (x) `(,(car x) ,(let-alist--access-sexp (car x) var))) | 136 | (let ,(mapcar (lambda (x) `(,(car x) ,(let-alist--access-sexp (car x) var))) |
| 137 | (delete-dups (let-alist--deep-dot-search body))) | 137 | (delete-dups (let-alist--deep-dot-search body))) |
diff --git a/test/automated/let-alist.el b/test/automated/let-alist.el index 391ccb44a8d..c43e6a07ddc 100644 --- a/test/automated/let-alist.el +++ b/test/automated/let-alist.el | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | (.test-two (cdr (assq 'test-two symbol)))) | 30 | (.test-two (cdr (assq 'test-two symbol)))) |
| 31 | (list .test-one .test-two | 31 | (list .test-one .test-two |
| 32 | .test-two .test-two))) | 32 | .test-two .test-two))) |
| 33 | (cl-letf (((symbol-function #'gensym) (lambda (x) 'symbol))) | 33 | (cl-letf (((symbol-function #'make-symbol) (lambda (x) 'symbol))) |
| 34 | (macroexpand | 34 | (macroexpand |
| 35 | '(let-alist data (list .test-one .test-two | 35 | '(let-alist data (list .test-one .test-two |
| 36 | .test-two .test-two)))))) | 36 | .test-two .test-two)))))) |