* lisp/emacs-lisp/edebug.el (edebug-instrument-function): Check a marker is
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 10 Feb 2011 19:21:07 +0000 (14:21 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 10 Feb 2011 19:21:07 +0000 (14:21 -0500)
still valid before using it.

lisp/ChangeLog
lisp/emacs-lisp/edebug.el

index 28f0b8d..dd33dda 100644 (file)
@@ -1,5 +1,8 @@
 2011-02-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * emacs-lisp/edebug.el (edebug-instrument-function): Check a marker is
+       still valid before using it.
+
        * progmodes/grep.el (grep-mode-font-lock-keywords): Adjust to
        `message' -> `compilation-message' rename (bug#8004).
 
index f281521..70a7983 100644 (file)
@@ -3394,7 +3394,7 @@ go to the end of the last sexp, or if that is the same point, then step."
   ;; Return the function symbol, or nil if not instrumented.
   (let ((func-marker (get func 'edebug)))
     (cond
-     ((markerp func-marker)
+     ((and (markerp func-marker) (marker-buffer func-marker))
       ;; It is uninstrumented, so instrument it.
       (with-current-buffer (marker-buffer func-marker)
        (goto-char func-marker)