Mercurial > emacs
changeset 55697:83b3b9e4e001
(gud-reset): Use unless & with-current-buffer.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 19 May 2004 19:00:02 +0000 |
parents | ed6e91c53c82 |
children | dae0dc3dfbad |
files | lisp/progmodes/gud.el |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gud.el Wed May 19 18:58:21 2004 +0000 +++ b/lisp/progmodes/gud.el Wed May 19 19:00:02 2004 +0000 @@ -2554,12 +2554,11 @@ (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.