diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-09-03 15:15:11 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-09-03 15:15:11 -0400 |
commit | c624ab229bdcefb42e4b81ff613e53c982f58cc1 (patch) | |
tree | f1db19a8ee8397d84e349e3fc6a7b96b883340cd /lisp/emacs-lisp/bytecomp.el | |
parent | 2d19f8c8b48803059272ac1c9582d8a9dbafe6f7 (diff) | |
download | emacs-c624ab229bdcefb42e4b81ff613e53c982f58cc1.tar.gz emacs-c624ab229bdcefb42e4b81ff613e53c982f58cc1.tar.bz2 emacs-c624ab229bdcefb42e4b81ff613e53c982f58cc1.zip |
Fix disassembly of non-compiled lexical functions (bug#21377)
* lisp/emacs-lisp/bytecomp.el (byte-compile): Handle `closure' arg.
* lisp/emacs-lisp/disass.el: Use lexical-binding.
(disassemble): Recognize `closure's as well.
(disassemble-internal): Use indirect-function and
help-function-arglist, and accept `closure's.
(disassemble-internal): Use interactive-form.
(disassemble-1): Use functionp.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 7182c0b6372..9edb8d7122c 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2585,7 +2585,9 @@ If FORM is a lambda or a macro, byte-compile it as a function." (if (symbolp form) form "provided")) fun) (t - (when (symbolp form) + (when (or (symbolp form) (eq (car-safe fun) 'closure)) + ;; `fun' is a function *value*, so try to recover its corresponding + ;; source code. (setq lexical-binding (eq (car fun) 'closure)) (setq fun (byte-compile--reify-function fun))) ;; Expand macros. |