]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/disass.el
(prin1-char): Use eventp.
[gnu-emacs] / lisp / emacs-lisp / disass.el
index 8b010c45e4ca47e7563958c063c9c800b1c8a501..ed632b14cd4927980c76d85b1d493e765f47dc2e 100644 (file)
@@ -1,10 +1,10 @@
 ;;; disass.el --- disassembler for compiled Emacs Lisp code
 
-;; Copyright (C) 1986, 1991 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1991, 2003  Free Software Foundation, Inc.
 
 ;; Author: Doug Cutting <doug@csli.stanford.edu>
 ;;     Jamie Zawinski <jwz@lucid.com>
-;; Maintainer: Jamie Zawinski <jwz@lucid.com>
+;; Maintainer: FSF
 ;; Keywords: internal
 
 ;; This file is part of GNU Emacs.
@@ -57,7 +57,7 @@ redefine OBJECT if it is a symbol."
   (interactive (list (intern (completing-read "Disassemble function: "
                                              obarray 'fboundp t))
                     nil 0 t))
-  (if (eq (car-safe object) 'byte-code)
+  (if (and (consp object) (not (eq (car object) 'lambda)))
       (setq object (list 'lambda () object)))
   (or indent (setq indent 0))          ;Default indent to zero
   (save-excursion
@@ -88,7 +88,7 @@ redefine OBJECT if it is a symbol."
        (setq macro t
              obj (cdr obj)))
     (if (and (listp obj) (eq (car obj) 'byte-code))
-       (setq obj (list 'lambda nil obj)))      
+       (setq obj (list 'lambda nil obj)))
     (if (and (listp obj) (not (eq (car obj) 'lambda)))
        (error "not a function"))
     (if (consp obj)
@@ -171,9 +171,9 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
              constvec (car (cdr (cdr obj))))   ;constant vector
       ;; If it is lazy-loaded, load it now
       (fetch-bytecode obj)
-      (setq bytes (string-as-unibyte (aref obj 1))
+      (setq bytes (aref obj 1)
            constvec (aref obj 2)))
-    (let ((lap (byte-decompile-bytecode bytes constvec))
+    (let ((lap (byte-decompile-bytecode (string-as-unibyte bytes) constvec))
          op arg opname pc-value)
       (let ((tagno 0)
            tmp
@@ -265,4 +265,5 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
 
 (provide 'disass)
 
+;;; arch-tag: 89482fe4-a087-4761-8dc6-d771054e763a
 ;;; disass.el ends here