From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kelly Dean Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Run hook when variable is set Date: Sat, 31 Jan 2015 09:23:07 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422696310 30296 80.91.229.3 (31 Jan 2015 09:25:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Jan 2015 09:25:10 +0000 (UTC) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 31 10:25:09 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 1YHUId-0005mz-Oh for ged-emacs-devel@m.gmane.org; Sat, 31 Jan 2015 10:25:07 +0100 Original-Received: from localhost ([::1]:40115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHUIc-0004Iv-Hw for ged-emacs-devel@m.gmane.org; Sat, 31 Jan 2015 04:25:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHUHq-000347-I8 for emacs-devel@gnu.org; Sat, 31 Jan 2015 04:24:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHUHn-00035n-BB for emacs-devel@gnu.org; Sat, 31 Jan 2015 04:24:18 -0500 Original-Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:45385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHUHn-000358-6C; Sat, 31 Jan 2015 04:24:15 -0500 Original-Received: from mfilter32-d.gandi.net (mfilter32-d.gandi.net [217.70.178.163]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 393D8172070; Sat, 31 Jan 2015 10:24:14 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter32-d.gandi.net Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter32-d.gandi.net (mfilter32-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id jHAm573vZ9Lq; Sat, 31 Jan 2015 10:24:12 +0100 (CET) X-Originating-IP: 66.220.3.179 Original-Received: from localhost (gm179.geneticmail.com [66.220.3.179]) (Authenticated sender: kelly@prtime.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 31009172074; Sat, 31 Jan 2015 10:24:10 +0100 (CET) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4b98:c:538::196 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:182120 Archived-At: 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.