aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/disass.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
index 60881ab176b..91427166137 100644
--- a/lisp/emacs-lisp/disass.el
+++ b/lisp/emacs-lisp/disass.el
@@ -64,8 +64,11 @@ redefine OBJECT if it is a symbol."
64 obarray 'fboundp t nil nil def)) 64 obarray 'fboundp t nil nil def))
65 nil 0 t))) 65 nil 0 t)))
66 (let ((lb lexical-binding)) 66 (let ((lb lexical-binding))
67 (if (and (consp object) (not (functionp object))) 67 (when (and (consp object) (not (eq (car object) 'lambda)))
68 (setq object `(lambda () ,object))) 68 (setq object
69 (if (eq (car object) 'byte-code)
70 (apply #'make-byte-code 0 (cdr object))
71 `(lambda () ,object))))
69 (or indent (setq indent 0)) ;Default indent to zero 72 (or indent (setq indent 0)) ;Default indent to zero
70 (save-excursion 73 (save-excursion
71 (if (or interactive-p (null buffer)) 74 (if (or interactive-p (null buffer))
@@ -113,8 +116,6 @@ redefine OBJECT if it is a symbol."
113 (if (eq (car-safe obj) 'macro) ;Handle macros. 116 (if (eq (car-safe obj) 'macro) ;Handle macros.
114 (setq macro t 117 (setq macro t
115 obj (cdr obj))) 118 obj (cdr obj)))
116 (if (eq (car-safe obj) 'byte-code)
117 (setq obj `(lambda () ,obj)))
118 (when (or (consp obj) (interpreted-function-p obj)) 119 (when (or (consp obj) (interpreted-function-p obj))
119 (unless (functionp obj) (error "Not a function")) 120 (unless (functionp obj) (error "Not a function"))
120 (if interactive-p (message (if name 121 (if interactive-p (message (if name
@@ -263,7 +264,7 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
263 (and (eq (car-safe arg) 'macro) 264 (and (eq (car-safe arg) 'macro)
264 (byte-code-function-p (cdr arg)))) 265 (byte-code-function-p (cdr arg))))
265 (cond ((byte-code-function-p arg) 266 (cond ((byte-code-function-p arg)
266 (insert "<compiled-function>\n")) 267 (insert "<byte-code-function>\n"))
267 (t (insert "<compiled macro>\n"))) 268 (t (insert "<compiled macro>\n")))
268 (disassemble-internal 269 (disassemble-internal
269 arg 270 arg