comparison lisp/emacs-lisp/debug.el @ 11062:302f676eeca0

(debugger-outer-load-read-function): New variable. (debug): Bind load-read-function to nil; save old value in debugger-outer-load-read-function and restore at end. (debugger-eval-expression): Handle load-read-function like other magic variables. (debugger-outer-overriding-local-map): New variable. (debug): Bind overriding-local-map to nil; save old value in debugger-outer-overriding-local-map and restore at end. (debugger-eval-expression): Handle overriding-local-map like other magic variables.
author Richard M. Stallman <rms@gnu.org>
date Sat, 18 Mar 1995 18:13:23 +0000
parents 65e10f44e765
children ee94cf4fd05a
comparison
equal deleted inserted replaced
11061:2f41090c58b3 11062:302f676eeca0
38 38
39 (defvar debugger-old-buffer nil 39 (defvar debugger-old-buffer nil
40 "This is the buffer that was current when the debugger was entered.") 40 "This is the buffer that was current when the debugger was entered.")
41 41
42 (defvar debugger-outer-match-data) 42 (defvar debugger-outer-match-data)
43 (defvar debugger-outer-load-read-function)
44 (defvar debugger-outer-overriding-local-map)
43 (defvar debugger-outer-track-mouse) 45 (defvar debugger-outer-track-mouse)
44 (defvar debugger-outer-last-command) 46 (defvar debugger-outer-last-command)
45 (defvar debugger-outer-this-command) 47 (defvar debugger-outer-this-command)
46 (defvar debugger-outer-unread-command-char) 48 (defvar debugger-outer-unread-command-char)
47 (defvar debugger-outer-unread-command-events) 49 (defvar debugger-outer-unread-command-events)
75 ;; Don't keep reading from an executing kbd macro! 77 ;; Don't keep reading from an executing kbd macro!
76 (executing-macro nil) 78 (executing-macro nil)
77 ;; Save the outer values of these vars for the `e' command 79 ;; Save the outer values of these vars for the `e' command
78 ;; before we replace the values. 80 ;; before we replace the values.
79 (debugger-outer-match-data (match-data)) 81 (debugger-outer-match-data (match-data))
82 (debugger-outer-load-read-function load-read-function)
83 (debugger-outer-overriding-local-map overriding-local-map)
80 (debugger-outer-track-mouse track-mouse) 84 (debugger-outer-track-mouse track-mouse)
81 (debugger-outer-last-command last-command) 85 (debugger-outer-last-command last-command)
82 (debugger-outer-this-command this-command) 86 (debugger-outer-this-command this-command)
83 (debugger-outer-unread-command-char unread-command-char) 87 (debugger-outer-unread-command-char unread-command-char)
84 (debugger-outer-unread-command-events unread-command-events) 88 (debugger-outer-unread-command-events unread-command-events)
92 ;; Don't let these magic variables affect the debugger itself. 96 ;; Don't let these magic variables affect the debugger itself.
93 (let ((last-command nil) this-command track-mouse 97 (let ((last-command nil) this-command track-mouse
94 (unread-command-char -1) unread-command-events 98 (unread-command-char -1) unread-command-events
95 last-input-event last-command-event last-nonmenu-event 99 last-input-event last-command-event last-nonmenu-event
96 last-event-frame 100 last-event-frame
101 overriding-local-map
102 load-read-function
97 (standard-input t) (standard-output t) 103 (standard-input t) (standard-output t)
98 (cursor-in-echo-area nil)) 104 (cursor-in-echo-area nil))
99 (unwind-protect 105 (unwind-protect
100 (save-excursion 106 (save-excursion
101 (save-window-excursion 107 (save-window-excursion
167 (fundamental-mode)) 173 (fundamental-mode))
168 (kill-buffer debugger-buffer)) 174 (kill-buffer debugger-buffer))
169 (store-match-data debugger-outer-match-data))) 175 (store-match-data debugger-outer-match-data)))
170 ;; Put into effect the modified values of these variables 176 ;; Put into effect the modified values of these variables
171 ;; in case the user set them with the `e' command. 177 ;; in case the user set them with the `e' command.
178 (setq load-read-function debugger-outer-load-read-function)
179 (setq overriding-local-map debugger-outer-overriding-local-map)
172 (setq track-mouse debugger-outer-track-mouse) 180 (setq track-mouse debugger-outer-track-mouse)
173 (setq last-command debugger-outer-last-command) 181 (setq last-command debugger-outer-last-command)
174 (setq this-command debugger-outer-this-command) 182 (setq this-command debugger-outer-this-command)
175 (setq unread-command-char debugger-outer-unread-command-char) 183 (setq unread-command-char debugger-outer-unread-command-char)
176 (setq unread-command-events debugger-outer-unread-command-events) 184 (setq unread-command-events debugger-outer-unread-command-events)
312 (last-command-event debugger-outer-last-command-event) 320 (last-command-event debugger-outer-last-command-event)
313 (last-nonmenu-event debugger-outer-last-nonmenu-event) 321 (last-nonmenu-event debugger-outer-last-nonmenu-event)
314 (last-event-frame debugger-outer-last-event-frame) 322 (last-event-frame debugger-outer-last-event-frame)
315 (standard-input debugger-outer-standard-input) 323 (standard-input debugger-outer-standard-input)
316 (standard-output debugger-outer-standard-output) 324 (standard-output debugger-outer-standard-output)
317 (cursor-in-echo-area debugger-outer-cursor-in-echo-area)) 325 (cursor-in-echo-area debugger-outer-cursor-in-echo-area)
326 (overriding-local-map debugger-outer-overriding-local-map)
327 (load-read-function debugger-outer-load-read-function))
318 (store-match-data debugger-outer-match-data) 328 (store-match-data debugger-outer-match-data)
319 (prog1 (eval-expression exp) 329 (prog1 (eval-expression exp)
320 (setq debugger-outer-match-data (match-data)) 330 (setq debugger-outer-match-data (match-data))
331 (setq debugger-outer-load-read-function load-read-function)
332 (setq debugger-outer-overriding-local-map overriding-local-map)
321 (setq debugger-outer-track-mouse track-mouse) 333 (setq debugger-outer-track-mouse track-mouse)
322 (setq debugger-outer-last-command last-command) 334 (setq debugger-outer-last-command last-command)
323 (setq debugger-outer-this-command this-command) 335 (setq debugger-outer-this-command this-command)
324 (setq debugger-outer-unread-command-char unread-command-char) 336 (setq debugger-outer-unread-command-char unread-command-char)
325 (setq debugger-outer-unread-command-events unread-command-events) 337 (setq debugger-outer-unread-command-events unread-command-events)