]> git.eshelyaron.com Git - emacs.git/commitdiff
(debugger-setup-buffer): When eval-buffer
authorRichard M. Stallman <rms@gnu.org>
Sat, 9 Jul 2005 04:14:26 +0000 (04:14 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 9 Jul 2005 04:14:26 +0000 (04:14 +0000)
was called with nil for the buffer, handle the read position right.
Handle read position for eval-region, too.

lisp/emacs-lisp/debug.el

index 94cca83a61d0754e542ef025833f987e19d087c1..76d86985079e6436469e481afac7091acf4be6c7 100644 (file)
@@ -314,8 +314,15 @@ That buffer should be current already."
   (save-excursion
     (while (re-search-forward "^  eval-buffer(" nil t)
       (end-of-line)
-      (insert (format "\n  ;;; Reading at buffer position %d"
-                     (with-current-buffer (nth 2 (backtrace-frame (debugger-frame-number)))
+      (insert (format "  ; Reading at buffer position %d"
+                     (with-current-buffer
+                         (or (nth 2 (backtrace-frame (debugger-frame-number)))
+                             debugger-old-buffer)
+                       (point)))))
+    (while (re-search-forward "^  eval-region(" nil t)
+      (end-of-line)
+      (insert (format "  ; Reading at buffer position %d"
+                     (with-current-buffer debugger-old-buffer
                        (point))))))
   (debugger-make-xrefs))