diff options
| author | Richard M. Stallman | 1995-10-30 19:22:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-30 19:22:23 +0000 |
| commit | 3fd4909e45e7e7a487b72dd67b63bf2055ed72c2 (patch) | |
| tree | 914389a7aea489d1762f9d3219b2a0e923510c3b | |
| parent | 83c4abcb4897f155999f436ffb28644cb08b7e5e (diff) | |
| download | emacs-3fd4909e45e7e7a487b72dd67b63bf2055ed72c2.tar.gz emacs-3fd4909e45e7e7a487b72dd67b63bf2055ed72c2.zip | |
(disassemble-internal): Handle lazy-loaded doc strings.
(disassemble-1): Handle lazy-loaded bytecode objects.
| -rw-r--r-- | lisp/emacs-lisp/disass.el | 5 |
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." | |||
| 114 | (if name (format " %s" name) ""))))) | 114 | (if name (format " %s" name) ""))))) |
| 115 | (let ((doc (if (consp obj) | 115 | (let ((doc (if (consp obj) |
| 116 | (and (stringp (car obj)) (car obj)) | 116 | (and (stringp (car obj)) (car obj)) |
| 117 | (and (> (length obj) 4) (aref obj 4))))) | 117 | ;; Use documentation to get lazy-loaded doc string |
| 118 | (documentation obj t)))) | ||
| 118 | (if (and doc (stringp doc)) | 119 | (if (and doc (stringp doc)) |
| 119 | (progn (and (consp obj) (setq obj (cdr obj))) | 120 | (progn (and (consp obj) (setq obj (cdr obj))) |
| 120 | (indent-to indent) | 121 | (indent-to indent) |
| @@ -166,6 +167,8 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler." | |||
| 166 | (if (consp obj) | 167 | (if (consp obj) |
| 167 | (setq bytes (car (cdr obj)) ;the byte code | 168 | (setq bytes (car (cdr obj)) ;the byte code |
| 168 | constvec (car (cdr (cdr obj)))) ;constant vector | 169 | constvec (car (cdr (cdr obj)))) ;constant vector |
| 170 | ;; If it is lazy-loaded, load it now | ||
| 171 | (fetch-bytecode obj) | ||
| 169 | (setq bytes (aref obj 1) | 172 | (setq bytes (aref obj 1) |
| 170 | constvec (aref obj 2))) | 173 | constvec (aref obj 2))) |
| 171 | (let ((lap (byte-decompile-bytecode bytes constvec)) | 174 | (let ((lap (byte-decompile-bytecode bytes constvec)) |