GNU bug report logs -
#72229
(setq overriding-terminal-local-map nil) in isearch-done
Previous Next
Full log
Message #20 received at 72229 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
> Indeed, you are right, `isearch-done' should restore the original value.
> The existing variable `isearch--saved-overriding-local-map' can't be used,
> so a similar variable should be added like in this patch:
LGTM for master - thank you.
> This mechanism looks like a variable watcher enabled by
> `add-variable-watcher'.
> So you could add a watcher that conditionally controls variable
> modifications.
I don't think variable watchers are very helpful here. They don't solve
the underlying problem: potentially infinite variables of the same name
can exist, shadowing each other, with values partly sharing structures.
Using variable watchers I can see whether a variable value gets shadowed
or unassigned using a set operation - but I can't know whether the
previous value still exists, as binding of some other variable, and if
it will be stored back into the variable. Nor do I have access to old
bindings and their values until the program assigns it back to the
variable.
I saw that in Bug#70938. Manipulations of a variable can interfere in
annoying ways.
Functions are different. You have only one dynamic binding (unless in
the rare case of using `cl-letf', which is extremely rare). And you
always have access to it to undo any prior modification.
Michael.
This bug report was last modified 1 year and 29 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.