[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: Stefan Monnier
Subject: bug#14714: 24.3.50; `isearch-filter-predicate(s)'
Date: Wed, 26 Jun 2013 21:32:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> 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',

No, you're thinking of advice-add.  add-function is different (tho it's
used internally by advice-add).
Basically, replace

    (add-hook 'isearch-filter-predicate #'foo nil t)
    (add-function :before-while (local isearch-filter-predicate) #'foo)

> (defvar isearch-filter-predicate nil)

For add-function to work well, you want to change this default value to
be a function, such as (lambda () t).


reply via email to

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