From: Stefan Monnier Date: Wed, 19 May 2004 19:00:02 +0000 (+0000) Subject: (gud-reset): Use unless & with-current-buffer. X-Git-Tag: ttn-vms-21-2-B4~6131 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=27149c587cdfede04c2cda8edc9c37eefb853dfa;p=emacs.git (gud-reset): Use unless & with-current-buffer. --- diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 84dec78d895..eb0b887bdf3 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -2554,12 +2554,11 @@ It is saved for when this flag is not set.") (defun gud-reset () (dolist (buffer (buffer-list)) - (if (not (eq buffer gud-comint-buffer)) - (save-excursion - (set-buffer buffer) - (when gud-minor-mode - (setq gud-minor-mode nil) - (kill-local-variable 'tool-bar-map)))))) + (unless (eq buffer gud-comint-buffer) + (with-current-buffer buffer + (when gud-minor-mode + (setq gud-minor-mode nil) + (kill-local-variable 'tool-bar-map)))))) (defun gud-display-frame () "Find and obey the last filename-and-line marker from the debugger.