]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Optimize away trivial
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 6 Nov 2014 03:16:41 +0000 (22:16 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 6 Nov 2014 03:16:41 +0000 (22:16 -0500)
uses of `funcall'.

lisp/ChangeLog
lisp/emacs-lisp/macroexp.el

index e81b3a736a73ec6bfeac895658fa2aaf16ba044d..91a076e20e5ec32da615760aa8538f3a8cd39783 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/macroexp.el (macroexp--expand-all): Optimize away trivial
+       uses of `funcall'.
+
 2014-11-06  Daiki Ueno  <ueno@gnu.org>
 
        * epa.el (epa-error-buffer): New variable.
@@ -7,8 +12,8 @@
        (epa-sign-file, epa-sign-region, epa-encrypt-region)
        (epa-export-keys, epa-insert-keys): Display output sent to stderr.
        Use setf instead of epg-context-set-*.
-       * epa-file.el (epa-file-insert-file-contents): Use
-       epa-display-error instead of epa-display-info.  Mimic the behavior
+       * epa-file.el (epa-file-insert-file-contents):
+       Use epa-display-error instead of epa-display-info.  Mimic the behavior
        of jka-compr when decryption program is not found.
        (epa-file-write-region): Use epa-display-error instead of
        epa-display-info.
index a96a7af77e8f5c83c3a5560159384e71a99e9b75..fc859e7af09891ea025c77b42efb9b60161e467e 100644 (file)
@@ -251,6 +251,10 @@ Assumes the caller has bound `macroexpand-all-environment'."
         (format "%s quoted with ' rather than with #'"
                 (list 'lambda (nth 1 f) '...))
         (macroexp--expand-all `(,fun ,arg1 ,f . ,args))))
+      (`(funcall (,(or 'quote 'function) ,(and f (pred symbolp) . ,_)) . ,args)
+       ;; Rewrite (funcall #'foo bar) to (foo bar), in case `foo'
+       ;; has a compiler-macro.
+       (macroexp--expand-all `(,f . ,args)))
       (`(,func . ,_)
        ;; Macro expand compiler macros.  This cannot be delayed to
        ;; byte-optimize-form because the output of the compiler-macro can