;; Installation:
;; To get the functions in this package bound to keys, use
;; M-x iswitchb-mode or customize the option `iswitchb-mode'.
+;; Alternatively, add the following line to your .emacs:
+;; (iswitchb-mode 1)
;; As you type in a substring, the list of buffers currently matching
;; the substring is displayed as you type. The list is ordered so
"Iswitchb-specific customization of minibuffer setup.
This hook is run during minibuffer setup iff `iswitchb' will be active.
-It is intended for use in customizing iswitchb for interoperation
-with other packages."
-;;; For instance:
-
-;;; \(add-hook 'iswitchb-minibuffer-setup-hook
-;;; \(function
-;;; \(lambda ()
-;;; \(make-local-variable 'resize-minibuffer-window-max-height)
-;;; \(setq resize-minibuffer-window-max-height 3))))
-
-;;; will constrain rsz-mini to a maximum minibuffer height of 3 lines when
-;;; iswitchb is running. Copied from `icomplete-minibuffer-setup-hook'."
+For instance:
+\(add-hook 'iswitchb-minibuffer-setup-hook
+ '\(lambda () (set (make-local-variable 'max-mini-window-height) 3)))
+will constrain the minibuffer to a maximum height of 3 lines when
+iswitchb is running."
:type 'hook
:group 'iswitchb)
nil ;require-match [handled elsewhere]
nil ;initial-contents
'iswitchb-history)))
- (if (get-buffer iswitchb-final-text)
+ (if (and (not (eq iswitchb-exit 'usefirst))
+ (get-buffer iswitchb-final-text))
;; This happens for example if the buffer was chosen with the mouse.
(setq iswitchb-matches (list iswitchb-final-text)))
(interactive)
(if (or (not iswitchb-require-match)
(iswitchb-existing-buffer-p))
- (throw 'exit nil)))
+ (progn
+ (setq iswitchb-exit 'usefirst)
+ (throw 'exit nil))))
(defun iswitchb-select-buffer-text ()
"Select the buffer named by the prompt.
(provide 'iswitchb)
+;;; arch-tag: d74198ae-753f-44f2-b34f-0c515398d90a
;;; iswitchb.el ends here