diff options
| author | Richard M. Stallman | 1997-05-02 00:25:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-05-02 00:25:25 +0000 |
| commit | 888472e07387e88d7b0a1178ca8a338e0e3c3bcb (patch) | |
| tree | 9c81d92adf66b4bfff9f030aab597c0d20d05a75 | |
| parent | 6c56c80b9c1e77932f0b014832c1053524c4a185 (diff) | |
| download | emacs-888472e07387e88d7b0a1178ca8a338e0e3c3bcb.tar.gz emacs-888472e07387e88d7b0a1178ca8a338e0e3c3bcb.zip | |
(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.
| -rw-r--r-- | lisp/iswitchb.el | 21 |
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.") | |||
| 201 | Possible values: | 201 | Possible values: |
| 202 | `samewindow' Show new buffer in same window | 202 | `samewindow' Show new buffer in same window |
| 203 | `otherwindow' Show new buffer in another window (same frame) | 203 | `otherwindow' Show new buffer in another window (same frame) |
| 204 | `display' Display buffer in another window without switching to it | ||
| 204 | `otherframe' Show new buffer in another frame | 205 | `otherframe' Show new buffer in another frame |
| 205 | `maybe-frame' If a buffer is visible in another frame, prompt to ask if you | 206 | `maybe-frame' If a buffer is visible in another frame, prompt to ask if you |
| 206 | you want to see the buffer in the same window of the current | 207 | you want to see the buffer in the same window of the current |
| @@ -233,7 +234,7 @@ See also `iswitchb-newbuffer'.") | |||
| 233 | 234 | ||
| 234 | (defvar iswitchb-method nil | 235 | (defvar iswitchb-method nil |
| 235 | "*Stores the method for viewing the selected buffer. | 236 | "*Stores the method for viewing the selected buffer. |
| 236 | Its value is one of `samewindow', `otherwindow', `otherframe', | 237 | Its value is one of `samewindow', `otherwindow', `display', `otherframe', |
| 237 | `maybe-frame' or `always-frame'. See `iswitchb-default-method' for | 238 | `maybe-frame' or `always-frame'. See `iswitchb-default-method' for |
| 238 | details of values.") | 239 | details of values.") |
| 239 | 240 | ||
| @@ -637,7 +638,7 @@ current frame, rather than all frames, regardless of value of | |||
| 637 | 638 | ||
| 638 | (defun iswitchb-get-matched-buffers (regexp &optional string-format buffer-list) | 639 | (defun iswitchb-get-matched-buffers (regexp &optional string-format buffer-list) |
| 639 | "Return matched buffers. | 640 | "Return matched buffers. |
| 640 | If STRING-FORMAT is non-nil, consider EGEXP as string. | 641 | If STRING-FORMAT is non-nil, consider REGEXP as string. |
| 641 | BUFFER-LIST can be list of buffers or list of strings." | 642 | BUFFER-LIST can be list of buffers or list of strings." |
| 642 | (let* ((case-fold-search iswitchb-case) | 643 | (let* ((case-fold-search iswitchb-case) |
| 643 | ;; need reverse since we are building up list backwards | 644 | ;; need reverse since we are building up list backwards |
| @@ -815,6 +816,9 @@ Return the modified list with the last element prepended to it." | |||
| 815 | ((eq iswitchb-method 'otherwindow) | 816 | ((eq iswitchb-method 'otherwindow) |
| 816 | (switch-to-buffer-other-window buffer)) | 817 | (switch-to-buffer-other-window buffer)) |
| 817 | 818 | ||
| 819 | ((eq iswitchb-method 'display) | ||
| 820 | (display-buffer buffer)) | ||
| 821 | |||
| 818 | ((eq iswitchb-method 'otherframe) | 822 | ((eq iswitchb-method 'otherframe) |
| 819 | (progn | 823 | (progn |
| 820 | (switch-to-buffer-other-frame buffer) | 824 | (switch-to-buffer-other-frame buffer) |
| @@ -865,6 +869,7 @@ Call this function to override the normal bindings." | |||
| 865 | (interactive) | 869 | (interactive) |
| 866 | (global-set-key "b" 'iswitchb-buffer) | 870 | (global-set-key "b" 'iswitchb-buffer) |
| 867 | (global-set-key "4b" 'iswitchb-buffer-other-window) | 871 | (global-set-key "4b" 'iswitchb-buffer-other-window) |
| 872 | (global-set-key "4" 'iswitchb-display-buffer) | ||
| 868 | (global-set-key "5b" 'iswitchb-buffer-other-frame)) | 873 | (global-set-key "5b" 'iswitchb-buffer-other-frame)) |
| 869 | 874 | ||
| 870 | 875 | ||
| @@ -895,6 +900,17 @@ For details of keybindings, do `\\[describe-function] iswitchb'." | |||
| 895 | 900 | ||
| 896 | 901 | ||
| 897 | ;;;###autoload | 902 | ;;;###autoload |
| 903 | (defun iswitchb-display-buffer () | ||
| 904 | "Display a buffer in another window but don't select it. | ||
| 905 | The buffer name is selected interactively by typing a substring. | ||
| 906 | For details of keybindings, do `\\[describe-function] iswitchb'." | ||
| 907 | (interactive) | ||
| 908 | (setq iswitchb-method 'display) | ||
| 909 | (iswitchb-entry)) | ||
| 910 | |||
| 911 | |||
| 912 | |||
| 913 | ;;;###autoload | ||
| 898 | (defun iswitchb-buffer-other-frame () | 914 | (defun iswitchb-buffer-other-frame () |
| 899 | "Switch to another buffer and show it in another frame. | 915 | "Switch to another buffer and show it in another frame. |
| 900 | The buffer name is selected interactively by typing a substring. | 916 | The buffer name is selected interactively by typing a substring. |
| @@ -1149,6 +1165,7 @@ Copied from `icomplete-tidy'." | |||
| 1149 | (member (symbol-name this-command) | 1165 | (member (symbol-name this-command) |
| 1150 | '("iswitchb-buffer" | 1166 | '("iswitchb-buffer" |
| 1151 | "iswitchb-buffer-other-frame" | 1167 | "iswitchb-buffer-other-frame" |
| 1168 | "iswitchb-display-buffer" | ||
| 1152 | "iswitchb-buffer-other-window")))) | 1169 | "iswitchb-buffer-other-window")))) |
| 1153 | 1170 | ||
| 1154 | (defun iswitchb-summaries-to-end () | 1171 | (defun iswitchb-summaries-to-end () |