271 |
:type '(repeat regexp) |
:type '(repeat regexp) |
272 |
:group 'iswitchb) |
:group 'iswitchb) |
273 |
|
|
274 |
|
(defcustom iswitchb-cannot-complete-hook 'iswitchb-completion-help |
275 |
|
"*Hook run when `iswitchb-complete' can't complete any more. |
276 |
|
The most useful values are `iswitchb-completion-help', which pops up a |
277 |
|
window with completion alternatives, or `iswitchb-next-match' or |
278 |
|
`iswitchb-prev-match', which cycle the buffer list." |
279 |
|
:type 'hook |
280 |
|
:group 'iswitchb) |
281 |
|
|
282 |
;;; Examples for setting the value of iswitchb-buffer-ignore |
;;; Examples for setting the value of iswitchb-buffer-ignore |
283 |
;(defun iswitchb-ignore-c-mode (name) |
;(defun iswitchb-ignore-c-mode (name) |
284 |
; "Ignore all c mode buffers -- example function for iswitchb." |
; "Ignore all c mode buffers -- example function for iswitchb." |
640 |
(interactive) |
(interactive) |
641 |
(let (res) |
(let (res) |
642 |
(cond ((not iswitchb-matches) |
(cond ((not iswitchb-matches) |
643 |
(iswitchb-completion-help)) |
(run-hooks 'iswitchb-cannot-complete-hook)) |
644 |
|
|
645 |
((= 1 (length iswitchb-matches)) |
((= 1 (length iswitchb-matches)) |
646 |
;; only one choice, so select it. |
;; only one choice, so select it. |
657 |
(delete-region (minibuffer-prompt-end) (point)) |
(delete-region (minibuffer-prompt-end) (point)) |
658 |
(insert res)) |
(insert res)) |
659 |
;; else nothing to complete |
;; else nothing to complete |
660 |
(iswitchb-completion-help) |
(run-hooks 'iswitchb-cannot-complete-hook) |
661 |
))))) |
))))) |
662 |
|
|
663 |
;;; TOGGLE FUNCTIONS |
;;; TOGGLE FUNCTIONS |