- (` (save-excursion ; of current-buffer
- (if edebug-save-windows
- (progn
- ;; After excursion, we will
- ;; restore to current window configuration.
- (setq edebug-inside-windows
- (edebug-current-windows edebug-save-windows))
- ;; Restore outside windows.
- (edebug-set-windows edebug-outside-windows)))
-
- (set-buffer edebug-buffer) ; why?
- ;; (use-local-map edebug-outside-map)
- (store-match-data edebug-outside-match-data)
- ;; Restore outside context.
- (let (;; (edebug-inside-map (current-local-map)) ;; restore map??
- (last-command-char edebug-outside-last-command-char)
- (last-command-event edebug-outside-last-command-event)
- (last-command edebug-outside-last-command)
- (this-command edebug-outside-this-command)
- (unread-command-char edebug-outside-unread-command-char)
- (unread-command-event edebug-outside-unread-command-event)
- (unread-command-events edebug-outside-unread-command-events)
- (last-input-char edebug-outside-last-input-char)
- (last-input-event edebug-outside-last-input-event)
- (last-event-frame edebug-outside-last-event-frame)
- (last-nonmenu-event edebug-outside-last-nonmenu-event)
- (track-mouse edebug-outside-track-mouse)
- (standard-output edebug-outside-standard-output)
- (standard-input edebug-outside-standard-input)
-
- (executing-macro edebug-outside-executing-macro)
- (defining-kbd-macro edebug-outside-defining-kbd-macro)
- (pre-command-hook edebug-outside-pre-command-hook)
- (post-command-hook edebug-outside-post-command-hook)
- (post-command-idle-hook edebug-outside-post-command-idle-hook)
-
- ;; See edebug-display
- (overlay-arrow-position edebug-outside-o-a-p)
- (overlay-arrow-string edebug-outside-o-a-s)
- (cursor-in-echo-area edebug-outside-c-i-e-a)
- )
- (unwind-protect
- (save-excursion ; of edebug-buffer
- (set-buffer edebug-outside-buffer)
- (goto-char edebug-outside-point)
- (if (marker-buffer (edebug-mark-marker))
- (set-marker (edebug-mark-marker) edebug-outside-mark))
- (,@ body))
-
- ;; Back to edebug-buffer. Restore rest of inside context.
- ;; (use-local-map edebug-inside-map)
- (if edebug-save-windows
- ;; Restore inside windows.
- (edebug-set-windows edebug-inside-windows))
-
- ;; Save values that may have been changed.
- (setq
- edebug-outside-last-command-char last-command-char
- edebug-outside-last-command-event last-command-event
- edebug-outside-last-command last-command
- edebug-outside-this-command this-command
- edebug-outside-unread-command-char unread-command-char
- edebug-outside-unread-command-event unread-command-event
- edebug-outside-unread-command-events unread-command-events
- edebug-outside-last-input-char last-input-char
- edebug-outside-last-input-event last-input-event
- edebug-outside-last-event-frame last-event-frame
- edebug-outside-last-nonmenu-event last-nonmenu-event
- edebug-outside-track-mouse track-mouse
- edebug-outside-standard-output standard-output
- edebug-outside-standard-input standard-input
-
- edebug-outside-executing-macro executing-macro
- edebug-outside-defining-kbd-macro defining-kbd-macro
- edebug-outside-pre-command-hook pre-command-hook
- edebug-outside-post-command-hook post-command-hook
- edebug-outside-post-command-idle-hook post-command-idle-hook
-
- edebug-outside-o-a-p overlay-arrow-position
- edebug-outside-o-a-s overlay-arrow-string
- edebug-outside-c-i-e-a cursor-in-echo-area
- ))) ; let
- )))
+ `(save-excursion ; of current-buffer
+ (if edebug-save-windows
+ (progn
+ ;; After excursion, we will
+ ;; restore to current window configuration.
+ (setq edebug-inside-windows
+ (edebug-current-windows edebug-save-windows))
+ ;; Restore outside windows.
+ (edebug-set-windows edebug-outside-windows)))
+
+ (set-buffer edebug-buffer) ; why?
+ ;; (use-local-map edebug-outside-map)
+ (set-match-data edebug-outside-match-data)
+ ;; Restore outside context.
+ (let (;; (edebug-inside-map (current-local-map)) ;; restore map??
+ (last-command-char edebug-outside-last-command-char)
+ (last-command-event edebug-outside-last-command-event)
+ (last-command edebug-outside-last-command)
+ (this-command edebug-outside-this-command)
+ (unread-command-char edebug-outside-unread-command-char)
+ (unread-command-events edebug-outside-unread-command-events)
+ (current-prefix-arg edebug-outside-current-prefix-arg)
+ (last-input-char edebug-outside-last-input-char)
+ (last-input-event edebug-outside-last-input-event)
+ (last-event-frame edebug-outside-last-event-frame)
+ (last-nonmenu-event edebug-outside-last-nonmenu-event)
+ (track-mouse edebug-outside-track-mouse)
+ (standard-output edebug-outside-standard-output)
+ (standard-input edebug-outside-standard-input)
+
+ (executing-kbd-macro edebug-outside-executing-macro)
+ (defining-kbd-macro edebug-outside-defining-kbd-macro)
+ ;; Get the values out of the saved statuses.
+ (pre-command-hook (cdr edebug-outside-pre-command-hook))
+ (post-command-hook (cdr edebug-outside-post-command-hook))
+
+ ;; See edebug-display
+ (overlay-arrow-position edebug-outside-o-a-p)
+ (overlay-arrow-string edebug-outside-o-a-s)
+ (cursor-in-echo-area edebug-outside-c-i-e-a)
+ )
+ (unwind-protect
+ (save-excursion ; of edebug-buffer
+ (set-buffer edebug-outside-buffer)
+ (goto-char edebug-outside-point)
+ (if (marker-buffer (edebug-mark-marker))
+ (set-marker (edebug-mark-marker) edebug-outside-mark))
+ ,@body)
+
+ ;; Back to edebug-buffer. Restore rest of inside context.
+ ;; (use-local-map edebug-inside-map)
+ (if edebug-save-windows
+ ;; Restore inside windows.
+ (edebug-set-windows edebug-inside-windows))
+
+ ;; Save values that may have been changed.
+ (setq
+ edebug-outside-last-command-char last-command-char
+ edebug-outside-last-command-event last-command-event
+ edebug-outside-last-command last-command
+ edebug-outside-this-command this-command
+ edebug-outside-unread-command-char unread-command-char
+ edebug-outside-unread-command-events unread-command-events
+ edebug-outside-current-prefix-arg current-prefix-arg
+ edebug-outside-last-input-char last-input-char
+ edebug-outside-last-input-event last-input-event
+ edebug-outside-last-event-frame last-event-frame
+ edebug-outside-last-nonmenu-event last-nonmenu-event
+ edebug-outside-track-mouse track-mouse
+ edebug-outside-standard-output standard-output
+ edebug-outside-standard-input standard-input
+
+ edebug-outside-executing-macro executing-kbd-macro
+ edebug-outside-defining-kbd-macro defining-kbd-macro
+
+ edebug-outside-o-a-p overlay-arrow-position
+ edebug-outside-o-a-s overlay-arrow-string
+ edebug-outside-c-i-e-a cursor-in-echo-area
+ )
+
+ ;; Restore the outside saved values; don't alter
+ ;; the outside binding loci.
+ (setcdr edebug-outside-pre-command-hook pre-command-hook)
+ (setcdr edebug-outside-post-command-hook post-command-hook)
+
+ )) ; let
+ ))