* lisp/emacs-lisp/debug.el (debug-convert-byte-code): Don't assume the
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 28 Sep 2011 01:20:41 +0000 (21:20 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 28 Sep 2011 01:20:41 +0000 (21:20 -0400)
object has more than 4 slots.

Fixes: debbugs:9613

lisp/ChangeLog
lisp/emacs-lisp/debug.el

index 4d1f762..eaea2b3 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/debug.el (debug-convert-byte-code): Don't assume the
+       object has more than 4 slots (bug#9613).
+
 2011-09-28  Juanma Barranquero  <lekktu@gmail.com>
 
        * subr.el (with-output-to-temp-buffer):
index d7021a4..d05a518 100644 (file)
@@ -869,8 +869,10 @@ To specify a nil argument interactively, exit with an empty minibuffer."
                  ,defn
                  ,@(remq '&rest (remq '&optional args))))))
        (if (> (length defn) 5)
+            ;; The mere presence of field 5 is sufficient to make
+            ;; it interactive.
            (push `(interactive ,(aref defn 5)) body))
-       (if (aref defn 4)
+       (if (and (> (length defn) 4) (aref defn 4))
            ;; Use `documentation' here, to get the actual string,
            ;; in case the compiled function has a reference
            ;; to the .elc file.