bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Drew Adams
Subject: bug#14714: 24.3.50; `isearch-filter-predicate(s)'
Date: Tue, 25 Jun 2013 10:26:15 -0700 (PDT)

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'





reply via email to

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