changeset 108309:8e422499f0ff

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.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 07 May 2010 20:20:30 -0400
parents ee0a08d8887e
children 17d73312ed65
files lisp/ChangeLog lisp/ebuff-menu.el lisp/electric.el
diffstat 3 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri May 07 16:33:00 2010 -0400
+++ b/lisp/ChangeLog	Fri May 07 20:20:30 2010 -0400
@@ -1,3 +1,10 @@
+2010-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* 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 <deniz.a.m.dogan@gmail.com>  (tiny change)
             Stefan Monnier  <monnier@iro.umontreal.ca>
 
--- a/lisp/ebuff-menu.el	Fri May 07 16:33:00 2010 -0400
+++ b/lisp/ebuff-menu.el	Fri May 07 20:20:30 2010 -0400
@@ -95,7 +95,7 @@
 					     (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)
--- a/lisp/electric.el	Fri May 07 16:33:00 2010 -0400
+++ b/lisp/electric.el	Fri May 07 20:20:30 2010 -0400
@@ -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)