changeset 64189:1fa9ee9a195a

(debugger-setup-buffer): When eval-buffer was called with nil for the buffer, handle the read position right. Handle read position for eval-region, too.
author Richard M. Stallman <rms@gnu.org>
date Sat, 09 Jul 2005 04:14:26 +0000
parents bb458675c9d0
children 58c5a27ce0fb
files lisp/emacs-lisp/debug.el
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/debug.el	Sat Jul 09 04:14:06 2005 +0000
+++ b/lisp/emacs-lisp/debug.el	Sat Jul 09 04:14:26 2005 +0000
@@ -314,8 +314,15 @@
   (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))