unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 14714@debbugs.gnu.org
Subject: bug#14714: 24.3.50; `isearch-filter-predicate(s)'
Date: Thu, 27 Jun 2013 00:31:13 +0300	[thread overview]
Message-ID: <87vc50pmzw.fsf@mail.jurta.org> (raw)
In-Reply-To: <jwvbo6u59aw.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 25 Jun 2013 14:46:49 -0400")

> 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 "b")))
(add-function :after-while  isearch-filter-predicate (lambda (b e) (message "a")))
(funcall isearch-filter-predicate 1 2)

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





  parent reply	other threads:[~2013-06-26 21:31 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 [this message]
2013-06-27  1:32     ` Stefan Monnier
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=87vc50pmzw.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=14714@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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).