]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/disass.el
(lisp-mode-shared-map): Bind `backspace' to `backward-delete-char-untabify'.
[gnu-emacs] / lisp / emacs-lisp / disass.el
index c541c89d29497443035c6d18da7937ec58f06816..bf9e9d04cccb5eb393f424d7407a72c888640933 100644 (file)
@@ -1,6 +1,6 @@
 ;;; disass.el --- disassembler for compiled Emacs Lisp code
 
-;;; Copyright (C) 1986, 1991 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1991 Free Software Foundation, Inc.
 
 ;; Author: Doug Cutting <doug@csli.stanford.edu>
 ;;     Jamie Zawinski <jwz@lucid.com>
@@ -20,8 +20,9 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
 
@@ -103,8 +104,9 @@ redefine OBJECT if it is a symbol."
           (setq obj (cdr obj))         ;throw lambda away
           (setq args (car obj))        ;save arg list
           (setq obj (cdr obj)))
-         (t
-          (setq args (aref obj 0))))
+         ((byte-code-function-p obj)
+          (setq args (aref obj 0)))
+          (t (error "Compilation failed")))
     (if (zerop indent) ; not a nested function
        (progn
          (indent-to indent)
@@ -171,7 +173,7 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
       (fetch-bytecode obj)
       (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
@@ -261,4 +263,6 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
          (insert "\n")))))
   nil)
 
+(provide 'disass)
+
 ;;; disass.el ends here