diff options
| author | Richard M. Stallman | 2005-06-25 13:52:15 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-06-25 13:52:15 +0000 |
| commit | 3e215e3007e1fafab6c19731e3cdeb2fbab7dc6b (patch) | |
| tree | ff5a6620cc5b8e81d0aac6b93105d32342b424ba | |
| parent | 38c3526f32c75729e70659eb92c4695a1a5dc868 (diff) | |
| download | emacs-3e215e3007e1fafab6c19731e3cdeb2fbab7dc6b.tar.gz emacs-3e215e3007e1fafab6c19731e3cdeb2fbab7dc6b.zip | |
(gud-filter): Simplify using with-selected-window and with-current-buffer.
| -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.") | |||
| 2534 | ;; This must be outside of the save-excursion | 2534 | ;; This must be outside of the save-excursion |
| 2535 | ;; in case the source file is our current buffer. | 2535 | ;; in case the source file is our current buffer. |
| 2536 | (if process-window | 2536 | (if process-window |
| 2537 | (save-selected-window | 2537 | (with-selected-window |
| 2538 | (select-window process-window) | ||
| 2539 | (gud-display-frame)) | 2538 | (gud-display-frame)) |
| 2540 | ;; We have to be in the proper buffer, (process-buffer proc), | 2539 | ;; We have to be in the proper buffer, (process-buffer proc), |
| 2541 | ;; but not in a save-excursion, because that would restore point. | 2540 | ;; but not in a save-excursion, because that would restore point. |
| 2542 | (let ((old-buf (current-buffer))) | 2541 | (with-current-buffer (process-buffer proc) |
| 2543 | (set-buffer (process-buffer proc)) | 2542 | (gud-display-frame)))) |
| 2544 | (unwind-protect | ||
| 2545 | (gud-display-frame) | ||
| 2546 | (set-buffer old-buf))))) | ||
| 2547 | 2543 | ||
| 2548 | ;; If we deferred text that arrived during this processing, | 2544 | ;; If we deferred text that arrived during this processing, |
| 2549 | ;; handle it now. | 2545 | ;; handle it now. |