mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(disassemble): Fix case of (byte-code ...) argument
* lisp/emacs-lisp/disass.el (disassemble): Handle (byte-code ...) here.. (disassemble-internal): ...instead of here. (disassemble-1): Adjust text to reflect the existence of other compiled functions.
This commit is contained in:
parent
f68e917273
commit
468f3f1cb4
1 changed files with 6 additions and 5 deletions
|
|
@ -64,8 +64,11 @@ redefine OBJECT if it is a symbol."
|
|||
obarray 'fboundp t nil nil def))
|
||||
nil 0 t)))
|
||||
(let ((lb lexical-binding))
|
||||
(if (and (consp object) (not (functionp object)))
|
||||
(setq object `(lambda () ,object)))
|
||||
(when (and (consp object) (not (eq (car object) 'lambda)))
|
||||
(setq object
|
||||
(if (eq (car object) 'byte-code)
|
||||
(apply #'make-byte-code 0 (cdr object))
|
||||
`(lambda () ,object))))
|
||||
(or indent (setq indent 0)) ;Default indent to zero
|
||||
(save-excursion
|
||||
(if (or interactive-p (null buffer))
|
||||
|
|
@ -113,8 +116,6 @@ redefine OBJECT if it is a symbol."
|
|||
(if (eq (car-safe obj) 'macro) ;Handle macros.
|
||||
(setq macro t
|
||||
obj (cdr obj)))
|
||||
(if (eq (car-safe obj) 'byte-code)
|
||||
(setq obj `(lambda () ,obj)))
|
||||
(when (or (consp obj) (interpreted-function-p obj))
|
||||
(unless (functionp obj) (error "Not a function"))
|
||||
(if interactive-p (message (if name
|
||||
|
|
@ -263,7 +264,7 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
|
|||
(and (eq (car-safe arg) 'macro)
|
||||
(byte-code-function-p (cdr arg))))
|
||||
(cond ((byte-code-function-p arg)
|
||||
(insert "<compiled-function>\n"))
|
||||
(insert "<byte-code-function>\n"))
|
||||
(t (insert "<compiled macro>\n")))
|
||||
(disassemble-internal
|
||||
arg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue