From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: toggling a minor mode should not tell Customize that the value has been set Date: Sat, 5 Jan 2008 09:48:47 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199555374 31579 80.91.229.12 (5 Jan 2008 17:49:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Jan 2008 17:49:34 +0000 (UTC) To: "Emacs-Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 05 18:49:55 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 1JBD9b-0007jZ-7C for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 18:49:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBD9E-00083n-O1 for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 12:49:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBD8M-0007hG-8b for emacs-devel@gnu.org; Sat, 05 Jan 2008 12:48:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBD8K-0007g5-At for emacs-devel@gnu.org; Sat, 05 Jan 2008 12:48:33 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBD8K-0007g0-6Q for emacs-devel@gnu.org; Sat, 05 Jan 2008 12:48:32 -0500 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JBD8K-00015y-12 for emacs-devel@gnu.org; Sat, 05 Jan 2008 12:48:32 -0500 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m05HmT2o009329 for ; Sat, 5 Jan 2008 10:48:29 -0700 Original-Received: from rcsmt251.oracle.com (rcsmt251.oracle.com [148.87.90.196]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m05AbimM013613 for ; Sat, 5 Jan 2008 10:48:28 -0700 Original-Received: from 141.144.88.86 by acsmt351.oracle.com with ESMTP id 3479104151199555305; Sat, 05 Jan 2008 09:48:25 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:86200 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? ;; Avoid overwriting a message shown by the body, ;; but do overwrite previous messages. (unless (and (current-message) (not (equal ,last-message (current-message)))) (message ,(format "%s %%sabled" pretty-name) (if ,mode "en" "dis"))))) This means that if you so much as toggle a global minor mode, and you later use `customize-customized' to see which options you have edited and set, the minor mode variable shows up in the list of customized options. This is wrong, IMO. Toggling a global minor mode should simply change the variable's current value; it should not also tell Customize to set that value (or tell it that the value has been set). What was the rationale behind this behavior? Why should toggling `iswitchb-mode' or `icicle-mode' tell Customize that the user has customized the mode variable? 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. It is unlikely that a global minor mode variable is in this category, and if it is, it should only be the use of Customize that counts for this, not merely toggling the mode.