From 27149c587cdfede04c2cda8edc9c37eefb853dfa Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 19 May 2004 19:00:02 +0000 Subject: [PATCH] (gud-reset): Use unless & with-current-buffer. --- lisp/progmodes/gud.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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. -- 2.39.5