unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14714: 24.3.50; `isearch-filter-predicate(s)'
@ 2013-06-25 17:26 Drew Adams
  2013-06-25 18:46 ` Stefan Monnier
  0 siblings, 1 reply; 14+ messages in thread
From: Drew Adams @ 2013-06-25 17:26 UTC (permalink / raw)
  To: 14714


Problem similar to that of bug #14712, regarding obsolescence, but I
think there is a code problem also.

1. `isearch-filter-predicates' should not be an _alias_ for
`isearch-filter-predicate'.  The former cannot just replace the latter.

2. I think one cannot currently use a single predicate as the value of
`isearch-filter-predicates'.  There is one place in the code where that
might work, because of this:

(if (consp isearch-filter-predicates)
    isearch-filter-predicates
  (list isearch-filter-predicates))

(But what if isearch-filter-predicates is nil?  You get `(nil)', which I
think is wrong.)

And in other places it should not work at all.  E.g.:

(run-hook-with-args-until-failure
  'isearch-filter-predicates
  (match-beginning 0) (match-end 0))

To make it work throughout, I think you would need to do something like this:

(when (and isearch-filter-predicates
           (atom isearch-filter-predicates))
  (setq isearch-filter-predicates (list isearch-filter-predicates)))

IOW, at the outset, convert an atomic (and non-nil) value to a cons.






In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-06-20 on ODIEONE
Bzr revision: 113100 eliz@gnu.org-20130620173624-w9v620tog4yacftk
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 CFLAGS=-O0 -g3 LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-08-05 18:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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