summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-04-29 13:47:15 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2024-04-29 13:47:15 -0400
commitccb49acd2afb8cec9cec1afba16e16420b9f9261 (patch)
treecea3a1499c6dc194ddd49eb2bb51f7c2df89a957 /lisp/emacs-lisp
parent7c835291dde79b39323a4a2623a14cc7564164cb (diff)
downloademacs-ccb49acd2afb8cec9cec1afba16e16420b9f9261.tar.gz
(disassemble-internal): Handle new function values
* lisp/emacs-lisp/disass.el (disassemble-internal): Fix the `interpreted-function` case.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/disass.el22
1 files changed, 10 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
index 15caee9b29c..60881ab176b 100644
--- a/lisp/emacs-lisp/disass.el
+++ b/lisp/emacs-lisp/disass.el
@@ -115,16 +115,14 @@ redefine OBJECT if it is a symbol."
obj (cdr obj)))
(if (eq (car-safe obj) 'byte-code)
(setq obj `(lambda () ,obj)))
- (when (consp obj)
+ (when (or (consp obj) (interpreted-function-p obj))
(unless (functionp obj) (error "Not a function"))
- (if (assq 'byte-code obj)
- nil
- (if interactive-p (message (if name
- "Compiling %s's definition..."
- "Compiling definition...")
- name))
- (setq obj (byte-compile obj))
- (if interactive-p (message "Done compiling. Disassembling..."))))
+ (if interactive-p (message (if name
+ "Compiling %s's definition..."
+ "Compiling definition...")
+ name))
+ (setq obj (byte-compile obj))
+ (if interactive-p (message "Done compiling. Disassembling...")))
(cond ((consp obj)
(setq args (help-function-arglist obj)) ;save arg list
(setq obj (cdr obj)) ;throw lambda away
@@ -171,9 +169,7 @@ redefine OBJECT if it is a symbol."
(let ((print-escape-newlines t))
(prin1 interactive (current-buffer))))
(insert "\n"))))
- (cond ((and (consp obj) (assq 'byte-code obj))
- (disassemble-1 (assq 'byte-code obj) indent))
- ((byte-code-function-p obj)
+ (cond ((byte-code-function-p obj)
(disassemble-1 obj indent))
(t
(insert "Uncompiled body: ")
@@ -279,6 +275,8 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
arg
(+ indent disassemble-recursive-indent)))
((eq (car-safe (car-safe arg)) 'byte-code)
+ ;; FIXME: I'm 99% sure bytecomp never generates
+ ;; this any more.
(insert "(<byte code>...)\n")
(mapc ;Recurse on list of byte-code objects.
(lambda (obj)