summaryrefslogtreecommitdiff
path: root/lisp/iswitchb.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-05-02 00:25:25 +0000
committerRichard M. Stallman <rms@gnu.org>1997-05-02 00:25:25 +0000
commitbec753c5b98a245a6de9ef5954d69f64a323c1f7 (patch)
tree576377ce8dd184f1e190a0d78ac9fc1ff7cef2b0 /lisp/iswitchb.el
parent9dad48ced04a95db4ad50d4ef695e96b655df6e3 (diff)
downloademacs-bec753c5b98a245a6de9ef5954d69f64a323c1f7.tar.gz
(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.
Diffstat (limited to 'lisp/iswitchb.el')
-rw-r--r--lisp/iswitchb.el21
1 files changed, 19 insertions, 2 deletions
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index 159aff8ed51..7ac80b5642a 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -201,6 +201,7 @@ example functions that filter buffernames.")
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 @@ See also `iswitchb-newbuffer'.")
(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 @@ current frame, rather than all frames, regardless of value of
(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 @@ Return the modified list with the last element prepended to it."
((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 @@ Call this function to override the normal bindings."
(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 @@ For details of keybindings, do `\\[describe-function] iswitchb'."
;;;###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 @@ Copied from `icomplete-tidy'."
(member (symbol-name this-command)
'("iswitchb-buffer"
"iswitchb-buffer-other-frame"
+ "iswitchb-display-buffer"
"iswitchb-buffer-other-window"))))
(defun iswitchb-summaries-to-end ()