;;; iswitchb.el --- switch between buffers using substrings
-;; Copyright (C) 1996-1997, 2000-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2000-2016 Free Software Foundation, Inc.
;; Author: Stephen Eglen <stephen@gnu.org>
;; Maintainer: Stephen Eglen <stephen@gnu.org>
;; iswitchb-read-buffer has been written to be a drop in replacement
;; for the normal buffer selection routine `read-buffer'. To use
;; iswitch for all buffer selections in Emacs, add:
-;; (setq read-buffer-function 'iswitchb-read-buffer)
+;; (setq read-buffer-function #'iswitchb-read-buffer)
;; (This variable was introduced in Emacs 20.3.)
;; XEmacs users can get the same behavior by doing:
-;; (defalias 'read-buffer 'iswitchb-read-buffer)
+;; (defalias 'read-buffer #'iswitchb-read-buffer)
;; since `read-buffer' is defined in lisp.
;; Using iswitchb for other completion tasks.
This hook is run during minibuffer setup if `iswitchb' is active.
For instance:
-\(add-hook 'iswitchb-minibuffer-setup-hook
- '\(lambda () (set (make-local-variable 'max-mini-window-height) 3)))
+\(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
))))
(defun iswitchb-read-buffer (prompt &optional default require-match
- start matches-set)
+ _predicate start matches-set)
"Replacement for the built-in `read-buffer'.
Return the name of a buffer selected.
PROMPT is the prompt to give to the user.
(and iswitchb-prompt-newbuffer
(y-or-n-p
- (format
+ (format-message
"No buffer matching `%s', create one? "
buf)))))
;; then create a new buffer