unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juri Linkov <juri@jurta.org>
Cc: 14714@debbugs.gnu.org
Subject: bug#14714: 24.3.50; `isearch-filter-predicate(s)'
Date: Wed, 26 Jun 2013 21:32:01 -0400	[thread overview]
Message-ID: <jwvk3lg8hp1.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87vc50pmzw.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 27 Jun 2013 00:31:13 +0300")

>> 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)
with
    (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).


        Stefan





  reply	other threads:[~2013-06-27  1:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 17:26 bug#14714: 24.3.50; `isearch-filter-predicate(s)' Drew Adams
2013-06-25 18:46 ` Stefan Monnier
2013-06-25 20:18   ` Drew Adams
2013-06-26  0:20     ` Stefan Monnier
2013-06-26  2:34       ` Drew Adams
2013-06-26 13:08         ` Stefan Monnier
2013-06-26 14:19           ` Drew Adams
2013-06-26 14:36             ` Stefan Monnier
2013-06-26 21:31   ` Juri Linkov
2013-06-27  1:32     ` Stefan Monnier [this message]
2013-06-27 23:39       ` Juri Linkov
2013-07-04  0:26         ` Stefan Monnier
2013-08-04  7:45           ` Stefan Monnier
2013-08-05 18:07             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk3lg8hp1.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=14714@debbugs.gnu.org \
    --cc=juri@jurta.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).