diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-06-25 13:52:15 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-06-25 13:52:15 +0000 |
commit | 3e215e3007e1fafab6c19731e3cdeb2fbab7dc6b (patch) | |
tree | ff5a6620cc5b8e81d0aac6b93105d32342b424ba /lisp/progmodes | |
parent | 38c3526f32c75729e70659eb92c4695a1a5dc868 (diff) | |
download | emacs-3e215e3007e1fafab6c19731e3cdeb2fbab7dc6b.tar.gz |
(gud-filter): Simplify using with-selected-window and with-current-buffer.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/gud.el | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index c6e85934db4..471d3b308ec 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -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. |