summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/debug.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2003-07-07 20:57:50 +0000
committerRichard M. Stallman <rms@gnu.org>2003-07-07 20:57:50 +0000
commit12cf32ce47088b2ec29a070d4a2910295675ecdf (patch)
tree5d35881f178dcff822fe8a06411bc7b3b09e6230 /lisp/emacs-lisp/debug.el
parent2fe837ffdc5ec488a2d87db3d92740a18e44ae2e (diff)
downloademacs-12cf32ce47088b2ec29a070d4a2910295675ecdf.tar.gz
(debug, debugger-env-macro): Use with-no-warnings while accessing and
binding unread-command-char.
Diffstat (limited to 'lisp/emacs-lisp/debug.el')
-rw-r--r--lisp/emacs-lisp/debug.el24
1 files changed, 18 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index f62b0c4836e..10c4fd4f734 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -128,7 +128,8 @@ first will be printed into the backtrace buffer."
(debugger-outer-track-mouse track-mouse)
(debugger-outer-last-command last-command)
(debugger-outer-this-command this-command)
- (debugger-outer-unread-command-char unread-command-char)
+ (debugger-outer-unread-command-char
+ (with-no-warnings unread-command-char))
(debugger-outer-unread-command-events unread-command-events)
(debugger-outer-unread-post-input-method-events
unread-post-input-method-events)
@@ -145,7 +146,7 @@ first will be printed into the backtrace buffer."
(setq overriding-terminal-local-map nil)
;; Don't let these magic variables affect the debugger itself.
(let ((last-command nil) this-command track-mouse
- (unread-command-char -1) unread-command-events
+ unread-command-events
unread-post-input-method-events
last-input-event last-command-event last-nonmenu-event
last-event-frame
@@ -161,6 +162,8 @@ first will be printed into the backtrace buffer."
(unwind-protect
(save-excursion
(save-window-excursion
+ (with-no-warnings
+ (setq unread-command-char -1))
(pop-to-buffer debugger-buffer)
(debugger-mode)
(debugger-setup-buffer debugger-args)
@@ -214,7 +217,8 @@ first will be printed into the backtrace buffer."
(setq track-mouse debugger-outer-track-mouse)
(setq last-command debugger-outer-last-command)
(setq this-command debugger-outer-this-command)
- (setq unread-command-char debugger-outer-unread-command-char)
+ (with-no-warnings
+ (setq unread-command-char debugger-outer-unread-command-char))
(setq unread-command-events debugger-outer-unread-command-events)
(setq unread-post-input-method-events
debugger-outer-unread-post-input-method-events)
@@ -487,7 +491,6 @@ Applies to the frame whose line point is on in the backtrace."
(track-mouse debugger-outer-track-mouse)
(last-command debugger-outer-last-command)
(this-command debugger-outer-this-command)
- (unread-command-char debugger-outer-unread-command-char)
(unread-command-events debugger-outer-unread-command-events)
(unread-post-input-method-events
debugger-outer-unread-post-input-method-events)
@@ -500,7 +503,17 @@ Applies to the frame whose line point is on in the backtrace."
(inhibit-redisplay debugger-outer-inhibit-redisplay)
(cursor-in-echo-area debugger-outer-cursor-in-echo-area))
(set-match-data debugger-outer-match-data)
- (prog1 (progn ,@body)
+ (prog1
+ (let ((save-ucc (with-no-warnings unread-command-char)))
+ (unwind-protect
+ (progn
+ (with-no-warnings
+ (setq unread-command-char debugger-outer-unread-command-char))
+ (prog1 (progn ,@body)
+ (with-no-warnings
+ (setq debugger-outer-unread-command-char unread-command-char))))
+ (with-no-warnings
+ (setq unread-command-char save-ucc))))
(setq debugger-outer-match-data (match-data))
(setq debugger-outer-load-read-function load-read-function)
(setq debugger-outer-overriding-terminal-local-map
@@ -509,7 +522,6 @@ Applies to the frame whose line point is on in the backtrace."
(setq debugger-outer-track-mouse track-mouse)
(setq debugger-outer-last-command last-command)
(setq debugger-outer-this-command this-command)
- (setq debugger-outer-unread-command-char unread-command-char)
(setq debugger-outer-unread-command-events unread-command-events)
(setq debugger-outer-unread-post-input-method-events
unread-post-input-method-events)