changeset 17618:8d33666b1152

(iswitchb-visit-buffer): Handle `display' alternative. (iswitchb-default-keybindings): Define C-x 4 C-o. (iswitchb-display-buffer): New function. (iswitchb-entryfn-p): Include iswitchb-display-buffer. (iswitchb-method, iswitchb-default-method): Doc fixes.
author Richard M. Stallman <rms@gnu.org>
date Fri, 02 May 1997 00:25:25 +0000
parents 4851316697c1
children c8e876b73dcd
files lisp/iswitchb.el
diffstat 1 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/iswitchb.el	Fri May 02 00:24:00 1997 +0000
+++ b/lisp/iswitchb.el	Fri May 02 00:25:25 1997 +0000
@@ -201,6 +201,7 @@
 Possible values:
 `samewindow'	Show new buffer in same window
 `otherwindow'	Show new buffer in another window (same frame)
+`display'	Display buffer in another window without switching to it
 `otherframe'	Show new buffer in another frame
 `maybe-frame'	If a buffer is visible in another frame, prompt to ask if you
 		you want to see the buffer in the same window of the current
@@ -233,7 +234,7 @@
 
 (defvar iswitchb-method nil
   "*Stores the method for viewing the selected buffer.  
-Its value is one of `samewindow', `otherwindow', `otherframe',
+Its value is one of `samewindow', `otherwindow', `display', `otherframe',
 `maybe-frame' or `always-frame'.  See `iswitchb-default-method' for
 details of values.")
 
@@ -637,7 +638,7 @@
 
 (defun iswitchb-get-matched-buffers (regexp &optional string-format buffer-list)
   "Return matched buffers.
-If STRING-FORMAT is non-nil, consider EGEXP as string.
+If STRING-FORMAT is non-nil, consider REGEXP as string.
 BUFFER-LIST can be list of buffers or list of strings."
   (let* ((case-fold-search  iswitchb-case)
 	 ;; need reverse since we are building up list backwards
@@ -815,6 +816,9 @@
      ((eq iswitchb-method 'otherwindow)
       (switch-to-buffer-other-window buffer))
 
+     ((eq iswitchb-method 'display)
+      (display-buffer buffer))
+
      ((eq iswitchb-method 'otherframe)
       (progn
 	(switch-to-buffer-other-frame buffer)
@@ -865,6 +869,7 @@
   (interactive)
   (global-set-key "b" 'iswitchb-buffer)
   (global-set-key "4b" 'iswitchb-buffer-other-window)
+  (global-set-key "4" 'iswitchb-display-buffer)
   (global-set-key "5b" 'iswitchb-buffer-other-frame))
 
 
@@ -895,6 +900,17 @@
 
 
 ;;;###autoload
+(defun iswitchb-display-buffer ()
+  "Display a buffer in another window but don't select it.
+The buffer name is selected interactively by typing a substring.
+For details of keybindings, do `\\[describe-function] iswitchb'."
+  (interactive)
+  (setq iswitchb-method 'display)
+  (iswitchb-entry))
+
+
+
+;;;###autoload
 (defun iswitchb-buffer-other-frame ()
   "Switch to another buffer and show it in another frame.
 The buffer name is selected interactively by typing a substring.
@@ -1149,6 +1165,7 @@
        (member (symbol-name this-command)
 	       '("iswitchb-buffer"
 		 "iswitchb-buffer-other-frame"
+		 "iswitchb-display-buffer"
 		 "iswitchb-buffer-other-window"))))
 
 (defun iswitchb-summaries-to-end ()