[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 468f3f1cb44: (disassemble): Fix case of `(byte-code ...)` argumen
From: |
Stefan Monnier |
Subject: |
master 468f3f1cb44: (disassemble): Fix case of `(byte-code ...)` argument |
Date: |
Wed, 1 May 2024 14:17:14 -0400 (EDT) |
branch: master
commit 468f3f1cb44b8807c49add4235af3fe20ea7a73b
Author: Andrea Corallo <acorallo@gnu.org>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
(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.
---
lisp/emacs-lisp/disass.el | 11 ++++++-----
1 file 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."
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 468f3f1cb44: (disassemble): Fix case of `(byte-code ...)` argument,
Stefan Monnier <=