summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-10-30 19:22:23 +0000
committerRichard M. Stallman <rms@gnu.org>1995-10-30 19:22:23 +0000
commite4b509af76d23f84124a85c6b44c866941d9fbab (patch)
treef28a9ddc4da993826c3d0c7042ed5ec2e439be03 /lisp/emacs-lisp
parent874531adf4bddc69f6f948630fa2cf4c6bed4af8 (diff)
downloademacs-e4b509af76d23f84124a85c6b44c866941d9fbab.tar.gz
(disassemble-internal): Handle lazy-loaded doc strings.
(disassemble-1): Handle lazy-loaded bytecode objects.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/disass.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
index 8a980db06ac..c541c89d294 100644
--- a/lisp/emacs-lisp/disass.el
+++ b/lisp/emacs-lisp/disass.el
@@ -114,7 +114,8 @@ redefine OBJECT if it is a symbol."
(if name (format " %s" name) "")))))
(let ((doc (if (consp obj)
(and (stringp (car obj)) (car obj))
- (and (> (length obj) 4) (aref obj 4)))))
+ ;; Use documentation to get lazy-loaded doc string
+ (documentation obj t))))
(if (and doc (stringp doc))
(progn (and (consp obj) (setq obj (cdr obj)))
(indent-to indent)
@@ -166,6 +167,8 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
(if (consp obj)
(setq bytes (car (cdr obj)) ;the byte code
constvec (car (cdr (cdr obj)))) ;constant vector
+ ;; If it is lazy-loaded, load it now
+ (fetch-bytecode obj)
(setq bytes (aref obj 1)
constvec (aref obj 2)))
(let ((lap (byte-decompile-bytecode bytes constvec))