emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0d112c0: Fix bug in generator function with pcase (


From: Mark Oteiza
Subject: [Emacs-diffs] master 0d112c0: Fix bug in generator function with pcase (Bug#26068)
Date: Sun, 19 Mar 2017 15:11:54 -0400 (EDT)

branch: master
commit 0d112c00ba0ec14bd3014efcd3430b9ddcfe1fc1
Author: Paul Pogonyshev <address@hidden>
Commit: Mark Oteiza <address@hidden>

    Fix bug in generator function with pcase (Bug#26068)
    
    * lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Remove some calls
    to symbol-name.
---
 lisp/emacs-lisp/cl-macs.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 40342f3..58bcdd5 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."
           (pcase exp
             ((pred symbolp)
              ;; Perform symbol-macro expansion.
-             (when (cdr (assq (symbol-name exp) env))
-               (setq exp (cadr (assq (symbol-name exp) env)))))
+             (when (cdr (assq exp env))
+               (setq exp (cadr (assq exp env)))))
             (`(setq . ,_)
              ;; Convert setq to setf if required by symbol-macro expansion.
              (let* ((args (mapcar (lambda (f) (cl--sm-macroexpand f env))
@@ -2078,7 +2078,7 @@ except that it additionally expands symbol macros."
              (let ((letf nil) (found nil) (nbs ()))
                (dolist (binding bindings)
                  (let* ((var (if (symbolp binding) binding (car binding)))
-                        (sm (assq (symbol-name var) env)))
+                        (sm (assq var env)))
                    (push (if (not (cdr sm))
                              binding
                            (let ((nexp (cadr sm)))
@@ -2149,7 +2149,7 @@ by EXPANSION, and (setq NAME ...) will act like (setf 
EXPANSION ...).
             (let ((expansion
                    ;; FIXME: For N bindings, this will traverse `body' N times!
                    (macroexpand-all (macroexp-progn body)
-                                    (cons (list (symbol-name (caar bindings))
+                                    (cons (list (caar bindings)
                                                 (cl-cadar bindings))
                                           macroexpand-all-environment))))
               (if (or (null (cdar bindings)) (cl-cddar bindings))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]