[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14714: 24.3.50; `isearch-filter-predicate(s)'

From: Juri Linkov
Subject: bug#14714: 24.3.50; `isearch-filter-predicate(s)'
Date: Thu, 27 Jun 2013 00:31:13 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> Actually, shouldn't we revert this change and use
> (add-function :before-while ...) on isearch-filter-predicate instead?

Currently I'm exploring possibilities of using `:before-while'
instead of `run-hook-with-args-until-failure'.

IIUC, it can be used to replace hooks, so that for example,
when someone wants to put an additional function on `find-file',
it's possible to use `add-function' instead of appending
that function to `find-file-hook' (or `find-file-hooks'
that is an obsolete alias of `find-file-hook').

But in case of `isearch-filter-predicate', I don't understand
where and on which function to put additional predicate functions.
`isearch-filter-predicate' is a variable, not a function,
so it can't be used for the PLACE argument of `add-function'.
What I'm trying is:

(defvar isearch-filter-predicate nil)
(add-function :before-while isearch-filter-predicate (lambda (b e) (message 
(add-function :after-while  isearch-filter-predicate (lambda (b e) (message 
(funcall isearch-filter-predicate 1 2)

This fails with the error: (void-function nil)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]