diff options
author | Richard M. Stallman <rms@gnu.org> | 2001-11-19 14:08:49 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2001-11-19 14:08:49 +0000 |
commit | a32f9f28f73c14face716d507175014434aea727 (patch) | |
tree | 85481eb5e77b3ce3951fdda212d2281c4262eef6 /lisp/iswitchb.el | |
parent | 77f2099fddec1b1e1a42625fd21784723214b56e (diff) | |
download | emacs-a32f9f28f73c14face716d507175014434aea727.tar.gz |
(iswitchb-cannot-complete-hook): New variable to
control behaviour when no further completion is possible.
Diffstat (limited to 'lisp/iswitchb.el')
-rw-r--r-- | lisp/iswitchb.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 9e1b80e8f2e..74aa2085082 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -271,6 +271,14 @@ example functions that filter buffernames." :type '(repeat regexp) :group 'iswitchb) +(defcustom iswitchb-cannot-complete-hook 'iswitchb-completion-help + "*Hook run when `iswitchb-complete' can't complete any more. +The most useful values are `iswitchb-completion-help', which pops up a +window with completion alternatives, or `iswitchb-next-match' or +`iswitchb-prev-match', which cycle the buffer list." + :type 'hook + :group 'iswitchb) + ;;; Examples for setting the value of iswitchb-buffer-ignore ;(defun iswitchb-ignore-c-mode (name) ; "Ignore all c mode buffers -- example function for iswitchb." @@ -632,7 +640,7 @@ The result is stored in `iswitchb-common-match-string'." (interactive) (let (res) (cond ((not iswitchb-matches) - (iswitchb-completion-help)) + (run-hooks 'iswitchb-cannot-complete-hook)) ((= 1 (length iswitchb-matches)) ;; only one choice, so select it. @@ -649,7 +657,7 @@ The result is stored in `iswitchb-common-match-string'." (delete-region (minibuffer-prompt-end) (point)) (insert res)) ;; else nothing to complete - (iswitchb-completion-help) + (run-hooks 'iswitchb-cannot-complete-hook) ))))) ;;; TOGGLE FUNCTIONS |