From: Stefan Monnier Date: Sat, 8 May 2010 00:20:30 +0000 (-0400) Subject: Misc code tweaks. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~232 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba5bf5f0f9d661602397cd690d796940b17173ba;p=emacs.git 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. --- 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)