Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Detect when variable changes

4 views
Skip to first unread message

Joe Riel

unread,
Oct 4, 2017, 2:57:32 PM10/4/17
to Help GNU Emacs
Is there a way to detect when a variable changes?
Specifically, the buffer-local variable default-directory
is changing at some point and I'd like to detect
what code is doing that.

--
Joe Riel


Eli Zaretskii

unread,
Oct 4, 2017, 3:40:29 PM10/4/17
to help-gn...@gnu.org
> Date: Wed, 4 Oct 2017 11:57:18 -0700
> From: Joe Riel <jo...@san.rr.com>
>
> Is there a way to detect when a variable changes?

Emacs 26 has a watchpoint-like facility which you could use for that.

0 new messages