diff options
| author | Paul Pogonyshev | 2017-03-12 09:51:23 +0100 |
|---|---|---|
| committer | Mark Oteiza | 2017-03-19 15:03:35 -0400 |
| commit | 0d112c00ba0ec14bd3014efcd3430b9ddcfe1fc1 (patch) | |
| tree | ba0111024dbfb91bfb1aab36c5648255fbf81452 | |
| parent | d602785139c57274e835e7b56305d42e72a28b0d (diff) | |
| download | emacs-0d112c00ba0ec14bd3014efcd3430b9ddcfe1fc1.tar.gz emacs-0d112c00ba0ec14bd3014efcd3430b9ddcfe1fc1.zip | |
Fix bug in generator function with pcase (Bug#26068)
* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Remove some calls
to symbol-name.
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 40342f3fe48..58bcdd52acf 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -2059,8 +2059,8 @@ except that it additionally expands symbol macros." | |||
| 2059 | (pcase exp | 2059 | (pcase exp |
| 2060 | ((pred symbolp) | 2060 | ((pred symbolp) |
| 2061 | ;; Perform symbol-macro expansion. | 2061 | ;; Perform symbol-macro expansion. |
| 2062 | (when (cdr (assq (symbol-name exp) env)) | 2062 | (when (cdr (assq exp env)) |
| 2063 | (setq exp (cadr (assq (symbol-name exp) env))))) | 2063 | (setq exp (cadr (assq exp env))))) |
| 2064 | (`(setq . ,_) | 2064 | (`(setq . ,_) |
| 2065 | ;; Convert setq to setf if required by symbol-macro expansion. | 2065 | ;; Convert setq to setf if required by symbol-macro expansion. |
| 2066 | (let* ((args (mapcar (lambda (f) (cl--sm-macroexpand f env)) | 2066 | (let* ((args (mapcar (lambda (f) (cl--sm-macroexpand f env)) |
| @@ -2078,7 +2078,7 @@ except that it additionally expands symbol macros." | |||
| 2078 | (let ((letf nil) (found nil) (nbs ())) | 2078 | (let ((letf nil) (found nil) (nbs ())) |
| 2079 | (dolist (binding bindings) | 2079 | (dolist (binding bindings) |
| 2080 | (let* ((var (if (symbolp binding) binding (car binding))) | 2080 | (let* ((var (if (symbolp binding) binding (car binding))) |
| 2081 | (sm (assq (symbol-name var) env))) | 2081 | (sm (assq var env))) |
| 2082 | (push (if (not (cdr sm)) | 2082 | (push (if (not (cdr sm)) |
| 2083 | binding | 2083 | binding |
| 2084 | (let ((nexp (cadr sm))) | 2084 | (let ((nexp (cadr sm))) |
| @@ -2149,7 +2149,7 @@ by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...). | |||
| 2149 | (let ((expansion | 2149 | (let ((expansion |
| 2150 | ;; FIXME: For N bindings, this will traverse `body' N times! | 2150 | ;; FIXME: For N bindings, this will traverse `body' N times! |
| 2151 | (macroexpand-all (macroexp-progn body) | 2151 | (macroexpand-all (macroexp-progn body) |
| 2152 | (cons (list (symbol-name (caar bindings)) | 2152 | (cons (list (caar bindings) |
| 2153 | (cl-cadar bindings)) | 2153 | (cl-cadar bindings)) |
| 2154 | macroexpand-all-environment)))) | 2154 | macroexpand-all-environment)))) |
| 2155 | (if (or (null (cdar bindings)) (cl-cddar bindings)) | 2155 | (if (or (null (cdar bindings)) (cl-cddar bindings)) |