From f925fc93bac41d7622d1af927e33b0e738ff55b0 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 16 Mar 2015 14:49:01 -0400 Subject: Add `predicate' arg to `read-buffer' and use it for erc-iswitchb Fixes: debbugs:20116 * src/minibuf.c (Fread_buffer): Add `predicate' argument. * src/callint.c (Fcall_interactively): Adjust calls accordingly. * lisp/erc/erc.el (erc-switch-to-buffer): Rename from erc-iswitchb and rewrite using read-buffer. (erc--buffer-p): New function, extracted from erc-buffer-filter. (erc-buffer-filter): Use it. (erc-with-all-buffers-of-server): Silence compile warning if the return value is unused. (erc-is-valid-nick-p, erc-common-server-suffixes, erc-get-arglist) (erc-command-name, erc-popup-input-buffer): Use \` and \' to match beg/end of string. * lisp/obsolete/iswitchb.el (iswitchb-read-buffer): Add `predicate' arg. * lisp/isearchb.el (isearchb-iswitchb): Adjust accordingly. * lisp/ido.el (ido-read-buffer): Add `predicate' argument. * lisp/misearch.el (unload-function-defs-list): Declare before use. --- lisp/obsolete/iswitchb.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp/obsolete') diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index 6b1e5347e21..111de8537d3 100644 --- a/lisp/obsolete/iswitchb.el +++ b/lisp/obsolete/iswitchb.el @@ -175,10 +175,10 @@ ;; 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. @@ -586,7 +586,7 @@ in a separate window. )))) (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. -- cgit v1.2.3