From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: toggling a minor mode should not tell Customize that the value has been set Date: Sun, 06 Jan 2008 20:32:53 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199669584 12877 80.91.229.12 (7 Jan 2008 01:33:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Jan 2008 01:33:04 +0000 (UTC) Cc: Emacs-Devel To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 07 02:33:25 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JBgrk-0007w0-HO for ged-emacs-devel@m.gmane.org; Mon, 07 Jan 2008 02:33:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBgrN-0007Ii-Ii for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 20:33:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBgrJ-0007Id-2W for emacs-devel@gnu.org; Sun, 06 Jan 2008 20:32:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBgrG-0007IR-LR for emacs-devel@gnu.org; Sun, 06 Jan 2008 20:32:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBgrG-0007IO-GB for emacs-devel@gnu.org; Sun, 06 Jan 2008 20:32:54 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JBgrG-00055L-7V for emacs-devel@gnu.org; Sun, 06 Jan 2008 20:32:54 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAFcQgUfO+K+E/2dsb2JhbACmSg X-IronPort-AV: E=Sophos;i="4.24,251,1196658000"; d="scan'208";a="12348672" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 06 Jan 2008 20:32:53 -0500 Original-Received: from pastel.home ([206.248.175.132]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id NCN99253; Sun, 06 Jan 2008 20:32:53 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 3E8D07F7C; Sun, 6 Jan 2008 20:32:53 -0500 (EST) In-Reply-To: (Drew Adams's message of "Sun, 6 Jan 2008 15:00:56 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:86412 Archived-At: >> In contrast, when the user interactively does M-x foo-mode RET, we know >> that this has been done in a way that Customize can easily understand >> and which does not affect its ability o make further changes and/or save >> the variable. Calling it customize-mark-as-set is a way to better >> interact with Customize. > You could say the same thing for any assignment to any user option outside > of Customize, interactive or not. No, you couldn't. The fact that you can't is at the very core of the existence of the status "set outside Customize". That's also why the call to customize-mark-as-set is only done if the minor mode function is called interactively. Your failure to understand the above is probably at the origin of your desire to change the behavior. Depending on how the assignment takes place, Customize can't do anything with it: modifying the variable back to some other value may not actually take effect (because the offending setq may be on a post-command-hook, for example and hence resets the var right after Customize changed it), saving the var may also fail to take effect next time we start Emacs (because the offending `setq' is run later on in the .emacs file), ... Stefan