emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Run hook when variable is set


From: Kelly Dean
Subject: Re: [PATCH] Run hook when variable is set
Date: Sat, 31 Jan 2015 09:23:07 +0000

Richard Stallman wrote:
> Hooks on setting variables is a fundamentally bad idea
> because it means that Lisp code which appears to just bind variables
> can call functions where you did not expect it.

But what if it's documented? For example, it's documented that setting the 
variable cursor-type not only sets a variable, but also has the side effect of 
changing how the cursor is displayed.

Disabling dynamic-cursor-mode could simply be another documented side effect of 
setting cursor-type. And DCM itself should also document that it's disabled 
when cursor-type is set, which is why I already included that in the docstring 
in the patch I posted.

Besides that, hooks on setting variables would be useful for debugging.



reply via email to

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