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: Sat, 05 Jan 2008 21:14:25 -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 1199585696 18973 80.91.229.12 (6 Jan 2008 02:14:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jan 2008 02:14:56 +0000 (UTC) Cc: Emacs-Devel To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 06 03:15:16 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 1JBL2i-0000oa-3c for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 03:15:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBL2L-0003JD-EK for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 21:14:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBL26-0003EM-QB for emacs-devel@gnu.org; Sat, 05 Jan 2008 21:14:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBL24-0003DC-O1 for emacs-devel@gnu.org; Sat, 05 Jan 2008 21:14:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBL24-0003D9-Io for emacs-devel@gnu.org; Sat, 05 Jan 2008 21:14:36 -0500 Original-Received: from 206-248-175-132.dsl.teksavvy.com ([206.248.175.132] helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JBL24-0007L6-Al for emacs-devel@gnu.org; Sat, 05 Jan 2008 21:14:36 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 7A431B40FF; Sat, 5 Jan 2008 21:14:25 -0500 (EST) In-Reply-To: (Drew Adams's message of "Sat, 5 Jan 2008 09:48:47 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:86279 Archived-At: > `define-minor-mode' adds this code to the definition of every minor mode: > (if (called-interactively-p) > (progn > ,(if globalp `(customize-mark-as-set ',mode)) ; <=== WHY? Because M-x foo-mode RET on such global minor-modes isn't much different from M-x customize-variable RET foo-mode RET .... -> Set for current session. > What was the rationale behind this behavior? Why should toggling The rationale is that Custom does not like it when Elisp code modifies a defcustom behind its back. If we don't do it, then Custom will simply tell you that the variable was set outside of Custom and that saving the var may hence not have the expected effect. > A user should be able to use `customize-customized' (including perhaps in > `kill-emacs-query-functions') to see what s?he has customized and might want > to save. Exactly, after trying our M-x iswtchb-mode RET she may very much like to see that iswitchb-mode is now eabled and that she could save it so that it's enabled next time around. Stefan