From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Run hook when variable is set Date: Sat, 31 Jan 2015 18:16:44 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: plane.gmane.org Content-Type: text/plain; charset=Utf-8 X-Trace: ger.gmane.org 1422746214 5456 80.91.229.3 (31 Jan 2015 23:16:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Jan 2015 23:16:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kelly Dean Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 01 00:16:53 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YHhHY-0001cJ-Ge for ged-emacs-devel@m.gmane.org; Sun, 01 Feb 2015 00:16:52 +0100 Original-Received: from localhost ([::1]:43056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHhHX-0003Ca-QA for ged-emacs-devel@m.gmane.org; Sat, 31 Jan 2015 18:16:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHhHT-0003CK-NF for emacs-devel@gnu.org; Sat, 31 Jan 2015 18:16:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHhHQ-0005TH-LC for emacs-devel@gnu.org; Sat, 31 Jan 2015 18:16:47 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHhHQ-0005TD-Hx for emacs-devel@gnu.org; Sat, 31 Jan 2015 18:16:44 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YHhHQ-0006z1-1p; Sat, 31 Jan 2015 18:16:44 -0500 In-reply-to: (message from Kelly Dean on Sat, 31 Jan 2015 09:23:07 +0000) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182150 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > 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. That is safe because it does not run Lisp code when you set the variable. Basically, redisplay looks at the value of the variable, and that happens only when redisplay gets called. > Disabling dynamic-cursor-mode could simply be another documented > side effect of setting cursor-type. If you do it by having redisplay check cursor-type and decide what to do about the cursor mode, I have nothing against it. However, having any variable, the binding of which can run Lisp code, is an absolute disaster. If the price we pay for to avoid that disaster is that we don't have the feature you would like, so be it. > Besides that, hooks on setting variables would be useful for debugging. No matter what they would be useful for, it is not worth the chaos they would cause. Maybe a specialized feature solely for debugging could be made safe. -- Dr Richard Stallman President, Free Software Foundation 51 Franklin St Boston MA 02110 USA www.fsf.org www.gnu.org Skype: No way! That's nonfree (freedom-denying) software. Use Ekiga or an ordinary phone call.