aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/debug.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 68a26d8ebab..f8d2940c0e6 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -30,6 +30,7 @@
30(defvar debug-function-list nil 30(defvar debug-function-list nil
31 "List of functions currently set for debug on entry.") 31 "List of functions currently set for debug on entry.")
32 32
33(defvar debugger-outer-match-data)
33(defvar debugger-outer-track-mouse) 34(defvar debugger-outer-track-mouse)
34(defvar debugger-outer-last-command) 35(defvar debugger-outer-last-command)
35(defvar debugger-outer-this-command) 36(defvar debugger-outer-this-command)
@@ -56,7 +57,6 @@ any other args you like. In that case, the list of args after the
56first will be printed into the backtrace buffer." 57first will be printed into the backtrace buffer."
57 (message "Entering debugger...") 58 (message "Entering debugger...")
58 (let (debugger-value 59 (let (debugger-value
59 (debugger-match-data (match-data))
60 (debug-on-error nil) 60 (debug-on-error nil)
61 (debug-on-quit nil) 61 (debug-on-quit nil)
62 (debugger-buffer (let ((default-major-mode 'fundamental-mode)) 62 (debugger-buffer (let ((default-major-mode 'fundamental-mode))
@@ -67,6 +67,7 @@ first will be printed into the backtrace buffer."
67 (executing-macro nil) 67 (executing-macro nil)
68 ;; Save the outer values of these vars for the `e' command 68 ;; Save the outer values of these vars for the `e' command
69 ;; before we replace the values. 69 ;; before we replace the values.
70 (debugger-outer-match-data (match-data))
70 (debugger-outer-track-mouse track-mouse) 71 (debugger-outer-track-mouse track-mouse)
71 (debugger-outer-last-command last-command) 72 (debugger-outer-last-command last-command)
72 (debugger-outer-this-command this-command) 73 (debugger-outer-this-command this-command)
@@ -148,7 +149,7 @@ first will be printed into the backtrace buffer."
148 (erase-buffer) 149 (erase-buffer)
149 (fundamental-mode)) 150 (fundamental-mode))
150 (kill-buffer debugger-buffer)) 151 (kill-buffer debugger-buffer))
151 (store-match-data debugger-match-data))) 152 (store-match-data debugger-outer-match-data)))
152 ;; Put into effect the modified values of these variables 153 ;; Put into effect the modified values of these variables
153 ;; in case the user set them with the `e' command. 154 ;; in case the user set them with the `e' command.
154 (setq track-mouse debugger-outer-track-mouse) 155 (setq track-mouse debugger-outer-track-mouse)
@@ -297,7 +298,9 @@ Applies to the frame whose line point is on in the backtrace."
297 (standard-input debugger-outer-standard-input) 298 (standard-input debugger-outer-standard-input)
298 (standard-output debugger-outer-standard-output) 299 (standard-output debugger-outer-standard-output)
299 (cursor-in-echo-area debugger-outer-cursor-in-echo-area)) 300 (cursor-in-echo-area debugger-outer-cursor-in-echo-area))
301 (store-match-data debugger-outer-match-data)
300 (prog1 (eval-expression exp) 302 (prog1 (eval-expression exp)
303 (setq debugger-outer-match-data (match-data))
301 (setq debugger-outer-track-mouse track-mouse) 304 (setq debugger-outer-track-mouse track-mouse)
302 (setq debugger-outer-last-command last-command) 305 (setq debugger-outer-last-command last-command)
303 (setq debugger-outer-this-command this-command) 306 (setq debugger-outer-this-command this-command)