From ba5bf5f0f9d661602397cd690d796940b17173ba Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 7 May 2010 20:20:30 -0400 Subject: [PATCH] Misc code tweaks. * electric.el (Electric-command-loop): Minor tweak. * ebuff-menu.el (electric-buffer-list): Try and make it behave a bit better with dedicated windows. --- lisp/ChangeLog | 7 +++++++ lisp/ebuff-menu.el | 2 +- lisp/electric.el | 6 ++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c822db5679..fde802367eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-05-08 Stefan Monnier + + * electric.el (Electric-command-loop): Minor tweak. + + * ebuff-menu.el (electric-buffer-list): Try and make it behave a bit + better with dedicated windows. + 2010-05-07 Deniz Dogan (tiny change) Stefan Monnier diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index 99704e02b35..6e307d1ab86 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -95,7 +95,7 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry. (cons first last)))))) (set-buffer buffer) (Buffer-menu-mode) - (bury-buffer buffer) + (bury-buffer) ;Get rid of window, if dedicated. (message ""))) (if select (progn (set-buffer buffer) diff --git a/lisp/electric.el b/lisp/electric.el index db53b5fa84e..fb3e462efba 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -58,12 +58,10 @@ (err nil) (prompt-string prompt)) (while t - (if (not (or (stringp prompt) (eq prompt nil) (eq prompt 'noprompt))) + (if (functionp prompt) (setq prompt-string (funcall prompt))) (if (not (stringp prompt-string)) - (if (eq prompt-string 'noprompt) - (setq prompt-string nil) - (setq prompt-string "->"))) + (setq prompt-string (unless (eq prompt-string 'noprompt) "->"))) (setq cmd (read-key-sequence prompt-string)) (setq last-command-event (aref cmd (1- (length cmd))) this-command (key-binding cmd t) -- 2.39.2