]> code.delx.au - gnu-emacs/commitdiff
(gud-filter): Simplify using with-selected-window and with-current-buffer.
authorRichard M. Stallman <rms@gnu.org>
Sat, 25 Jun 2005 13:52:15 +0000 (13:52 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 25 Jun 2005 13:52:15 +0000 (13:52 +0000)
lisp/progmodes/gud.el

index c6e85934db4345cfcb9be4f3439a7f69af2923cd..471d3b308ec82df8c1d37fcbe003ab8eee1714ca 100644 (file)
@@ -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.