mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-04 08:47:11 +00:00
(gud-filter): Simplify using with-selected-window and with-current-buffer.
This commit is contained in:
parent
38c3526f32
commit
3e215e3007
@ -2534,16 +2534,12 @@ It is saved for when this flag is not set.")
|
||||
;; This must be outside of the save-excursion
|
||||
;; in case the source file is our current buffer.
|
||||
(if process-window
|
||||
(save-selected-window
|
||||
(select-window process-window)
|
||||
(with-selected-window
|
||||
(gud-display-frame))
|
||||
;; We have to be in the proper buffer, (process-buffer proc),
|
||||
;; but not in a save-excursion, because that would restore point.
|
||||
(let ((old-buf (current-buffer)))
|
||||
(set-buffer (process-buffer proc))
|
||||
(unwind-protect
|
||||
(gud-display-frame)
|
||||
(set-buffer old-buf)))))
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(gud-display-frame))))
|
||||
|
||||
;; If we deferred text that arrived during this processing,
|
||||
;; handle it now.
|
||||
|
Loading…
Reference in New Issue
Block a user