]> git.eshelyaron.com Git - emacs.git/commit
macroexpand not needed
authorNoam Postavsky <npostavs@gmail.com>
Wed, 14 Aug 2013 04:40:20 +0000 (00:40 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sat, 12 Oct 2013 18:25:38 +0000 (14:25 -0400)
commit29abf59bad60ab9098231ddf2957ee8c9e68637a
tree96f5e85371eabaee1e7b691668c4875a8b1f0a7e
parent119a30f2ba833146fc6bdb0165ea773223580362
macroexpand not needed

Since lambda thunking replaced quoting in a76d167.

To see why, observe that cases 3 and 4 disassemble to identical code.
The difference between cases 1 and 2 shows why the macroexpand was
needed originally.

(defmacro test-quote (name-string)
  `(eval-after-load "foo"
     `(with-elapsed-timer ,(format "Configuring package %s" name-string)
        (message "test-quote"))))

(defmacro test-expand-quote (name-string)
  `(eval-after-load "foo"
     ,(macroexpand-all
       `(with-elapsed-timer ,(format "Configuring package %s" name-string)
          (message "test-expand-quote")))))

(defmacro test-lambda (name-string)
  `(eval-after-load "foo"
     `(,(lambda ()
          (with-elapsed-timer ,(format "Configuring package %s" name-string)
            (message "test-lambda"))))))

(defmacro test-expand-lambda (name-string)
  `(eval-after-load "foo"
     `(,(lambda ()
          ,(macroexpand-all
            `(with-elapsed-timer ,(format "Configuring package %s" name-string)
               (message "test-lambda")))))))

(disassemble (lambda () (test-quote "testing...")))
(disassemble (lambda () (test-expand-quote "testing...")))
(disassemble (lambda () (test-lambda "testing...")))
(disassemble (lambda () (test-expand-lambda "testing...")))
lisp/use-package/use-package.el