From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: custom-set-minor-mode Date: Sat, 9 Apr 2005 17:07:04 -0500 (CDT) Message-ID: <200504092207.j39M74D26179@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1113084550 11105 80.91.229.2 (9 Apr 2005 22:09:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Apr 2005 22:09:10 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 10 00:09:08 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DKO8I-0007tq-IZ for ged-emacs-devel@m.gmane.org; Sun, 10 Apr 2005 00:08:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DKNi5-0004An-73 for ged-emacs-devel@m.gmane.org; Sat, 09 Apr 2005 17:41:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DKNhK-00047N-9O for emacs-devel@gnu.org; Sat, 09 Apr 2005 17:40:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DKNh3-00041A-6L for emacs-devel@gnu.org; Sat, 09 Apr 2005 17:40:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DKNh2-00040N-SH for emacs-devel@gnu.org; Sat, 09 Apr 2005 17:40:40 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DKO9C-0002Gm-6a for emacs-devel@gnu.org; Sat, 09 Apr 2005 18:09:46 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j39M8X9N006749 for ; Sat, 9 Apr 2005 17:08:33 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j39M74D26179; Sat, 9 Apr 2005 17:07:04 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org 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:35815 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35815 Any non-nil value for a minor mode _variable_ is supposed to indicate an enabled mode. It would appear that this includes the value 0 and negative values. But currently, when set through Custom, such values disable the mode. I believe that it is definitely better to use `t' to enable a minor mode by default through Custom than a random non-nil value like 0. Otherwise Custom might get confused if something "simplifies" the non-nil value to `t', as I believe `define-minor-mode' does. On the other hand, it is clearly documented that any non-nil value of the variable indicates an enabled mode. I can install the following patch, if we want to change this: ===File ~/custom.el-diff==================================== *** custom.el 05 Mar 2005 21:27:39 -0600 1.81 --- custom.el 08 Apr 2005 22:22:22 -0500 *************** *** 841,848 **** this sets the local binding in that buffer instead." (if custom-local-buffer (with-current-buffer custom-local-buffer ! (funcall variable (or value 0))) ! (funcall variable (or value 0)))) (defun custom-quote (sexp) "Quote SEXP iff it is not self quoting." --- 841,848 ---- this sets the local binding in that buffer instead." (if custom-local-buffer (with-current-buffer custom-local-buffer ! (funcall variable (if value 1 0))) ! (funcall variable (if value 1 0)))) (defun custom-quote (sexp) "Quote SEXP iff it is not self quoting." ============================================================