[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22018: 25.0.50; REGRESSION wrt `isearch-new-word'
From: |
Drew Adams |
Subject: |
bug#22018: 25.0.50; REGRESSION wrt `isearch-new-word' |
Date: |
Thu, 26 Nov 2015 16:29:08 -0800 (PST) |
> > An alias (e.g., `defvaralias') would make it a global
> > variable, no?
>
> Yes. I'll probably do that anyway. There's obviously code
> out there calling setq on this variable. Since this variable
> is no longer let bound, these setq will globally define the
> variable anyway.
Any such code out there would be used within the scope of
the macro (i.e., in BODY) - that's the point of such code.
It would count on the `let' binding in `with-search-suspended'.
So an alternative to adding a global binding would be to
first bind `isearch-new-word' to `isearch-regexp-function',
just as was done before. That DTRT. Any assignment by setq
in BODY would *not* "globally define the variable anyway."
That would let any 3rd-party code that uses `isearch-new-word'
behave exactly the same as before wrt that local variable.
The behavior could be altered negatively or unexpectedly if
we suddenly change the variable to a defvar.
But this is more of a nit. I think it makes the behavior
cleaner, but admittedly it makes the code messier. So please
do whatever you think best, as long as the bug gets fixed.
Thx.