emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r118300: * lisp/emacs-lisp/macroexp.el (macroexp--ex


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r118300: * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Optimize away trivial
Date: Thu, 06 Nov 2014 03:16:46 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118300
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2014-11-05 22:16:41 -0500
message:
  * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Optimize away trivial
  uses of `funcall'.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/macroexp.el    
macroexp.el-20091113204419-o5vbwnq5f7feedwu-2966
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-11-06 03:04:22 +0000
+++ b/lisp/ChangeLog    2014-11-06 03:16:41 +0000
@@ -1,3 +1,8 @@
+2014-11-06  Stefan Monnier  <address@hidden>
+
+       * emacs-lisp/macroexp.el (macroexp--expand-all): Optimize away trivial
+       uses of `funcall'.
+
 2014-11-06  Daiki Ueno  <address@hidden>
 
        * 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.

=== modified file 'lisp/emacs-lisp/macroexp.el'
--- a/lisp/emacs-lisp/macroexp.el       2014-11-02 05:46:04 +0000
+++ b/lisp/emacs-lisp/macroexp.el       2014-11-06 03:16:41 +0000
@@ -251,6 +251,10 @@
         (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


reply via email to

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