From unknown Tue Jun 24 22:40:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8396: 24.0.50; why use options (vars) instead of faces for apropos? Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Mar 2011 17:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8396 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 8396@debbugs.gnu.org X-Debbugs-Original-To: Received: via spool by submit@debbugs.gnu.org id=B.130159179023684 (code B ref -1); Thu, 31 Mar 2011 17:17:01 +0000 Received: (at submit) by debbugs.gnu.org; 31 Mar 2011 17:16:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q5LTy-00069x-0t for submit@debbugs.gnu.org; Thu, 31 Mar 2011 13:16:30 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q5LTx-00069m-5z for submit@debbugs.gnu.org; Thu, 31 Mar 2011 13:16:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5LTq-0006cp-HF for submit@debbugs.gnu.org; Thu, 31 Mar 2011 13:16:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:56215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5LTq-0006cl-F1 for submit@debbugs.gnu.org; Thu, 31 Mar 2011 13:16:22 -0400 Received: from [140.186.70.92] (port=40423 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5LTp-00048s-9q for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 13:16:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5LTn-0006cE-IP for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 13:16:21 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:59711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5LTn-0006bq-CT for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2011 13:16:19 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p2VHGEnE008197 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Mar 2011 17:16:16 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p2VHGEwH001043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 31 Mar 2011 17:16:14 GMT Received: from abhmt002.oracle.com (abhmt002.oracle.com [141.146.116.11]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p2VHGDdc032427 for ; Thu, 31 Mar 2011 12:16:14 -0500 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 31 Mar 2011 10:16:13 -0700 From: "Drew Adams" Date: Thu, 31 Mar 2011 10:16:14 -0700 Message-ID: <2F4E512F2C714C4EA5E50E94777DC22A@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 Thread-Index: Acvvx1cUWy0CIjjAS/WRldgUVvPC/w== X-Source-IP: acsmt357.oracle.com [141.146.40.157] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4D94B6DE.00CE:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Throughout apropos.el, we use `defcustom's instead of `defface's for customizing the faces used. Why? Apropos should have its own faces, not variables that can be assigned to only existing faces (that have nothing to do with apropos). Try, for instance, C-u C-x = on the bold text in *Apropos*. You'll see this: There are text properties here: button (t) category apropos-symbol-button face bold <====== WHAT'S THAT ABOUT? skip t That doesn't help a user understand how to change the face used here. S?he shouldn't think that s?he can only customize face `bold' to take care of this. And there is nothing to indicate to the user that there is a customizable variable (`apropos-symbol-face') that is relevant for this. The user should have a real apropos face to customize. There is no reason to avoid creating faces for the needs of apropos (or anything else, for that matter.) Faces are customizable by design - there is no reason to resort to adding customizable variables when what is wanted is customizing the appearance (faces). In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-03-21 on 3249CTO Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.5) --no-opt --cflags -Ic:/imagesupport/include' From unknown Tue Jun 24 22:40:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8396: 24.0.50; why use options (vars) instead of faces for apropos? Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Apr 2011 19:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8396 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Drew Adams" Cc: 8396@debbugs.gnu.org Received: via spool by 8396-submit@debbugs.gnu.org id=B8396.130367432116951 (code B ref 8396); Sun, 24 Apr 2011 19:46:01 +0000 Received: (at 8396) by debbugs.gnu.org; 24 Apr 2011 19:45:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QE5FB-0004PL-Ct for submit@debbugs.gnu.org; Sun, 24 Apr 2011 15:45:21 -0400 Received: from vm-emlprdomr-05.its.yale.edu ([130.132.50.146]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QE5F9-0004P8-Ep for 8396@debbugs.gnu.org; Sun, 24 Apr 2011 15:45:19 -0400 Received: from furball (dhcp128036225098.central.yale.edu [128.36.225.98]) (authenticated bits=0) by vm-emlprdomr-05.its.yale.edu (8.14.4/8.14.4) with ESMTP id p3OJjDjR007437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 24 Apr 2011 15:45:14 -0400 Received: by furball (Postfix, from userid 1000) id 689A316055B; Sun, 24 Apr 2011 15:45:13 -0400 (EDT) From: Chong Yidong References: <2F4E512F2C714C4EA5E50E94777DC22A@us.oracle.com> Date: Sun, 24 Apr 2011 15:45:13 -0400 In-Reply-To: <2F4E512F2C714C4EA5E50E94777DC22A@us.oracle.com> (Drew Adams's message of "Thu, 31 Mar 2011 10:16:14 -0700") Message-ID: <87y62zv3g6.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.146 X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) "Drew Adams" writes: > Throughout apropos.el, we use `defcustom's instead of `defface's for > customizing the faces used. Why? Bad historical design. I don't see a good way to revert this, though. From unknown Tue Jun 24 22:40:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8396: 24.0.50; why use options (vars) instead of faces for apropos? Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Apr 2011 20:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8396 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "'Chong Yidong'" Cc: 8396@debbugs.gnu.org Received: via spool by 8396-submit@debbugs.gnu.org id=B8396.130367565821994 (code B ref 8396); Sun, 24 Apr 2011 20:08:02 +0000 Received: (at 8396) by debbugs.gnu.org; 24 Apr 2011 20:07:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QE5ak-0005ig-0B for submit@debbugs.gnu.org; Sun, 24 Apr 2011 16:07:38 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QE5ah-0005iH-Dt for 8396@debbugs.gnu.org; Sun, 24 Apr 2011 16:07:36 -0400 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p3OK7SeI023342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 24 Apr 2011 20:07:29 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p3OK7R0v015648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Apr 2011 20:07:27 GMT Received: from abhmt008.oracle.com (abhmt008.oracle.com [141.146.116.17]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p3OK7QUe004981; Sun, 24 Apr 2011 15:07:26 -0500 Received: from dradamslap1 (/10.159.42.33) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 24 Apr 2011 13:07:26 -0700 From: "Drew Adams" References: <2F4E512F2C714C4EA5E50E94777DC22A@us.oracle.com> <87y62zv3g6.fsf@stupidchicken.com> Date: Sun, 24 Apr 2011 13:07:28 -0700 Message-ID: <5814FFD2EF8F4E278D0ECDE2C5AC833A@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Thread-Index: AcwCuCZ/PSz/aviDS+WPES0qAsqhQAAAD9Yg In-Reply-To: <87y62zv3g6.fsf@stupidchicken.com> X-Source-IP: rcsinet13.oracle.com [148.87.113.125] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.4DB48301.005A:SCFMA4539811,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > > Throughout apropos.el, we use `defcustom's instead of `defface's for > > customizing the faces used. Why? > > Bad historical design. I don't see a good way to revert this, though. Surely this is not the first time Emacs has transitioned from variables to faces. ;-) Here's one suggestion: Start using `defface's and their resulting faces. Declare the corresponding options obsolete. If deemed absolutely necessary, the code could, for now, use either the option value (if non-nil) or the face. Eventually, we would remove the options. Something like this, perhaps: (use-a-face (or the-face-option 'the-face)) E.g.: (defcustom apropos-symbol-face nil "DOC MENTIONING IT IS OBSOLETE and to use face `apropos-symbol-face' instead." :group 'apropos :type '(choice (const :tag "None" nil) face)) (define-button-type 'apropos-symbol 'face (or apropos-symbol-face 'apropos-symbol-face) 'help-echo "mouse-2, RET: Display more help on this symbol" 'follow-link t 'action #'apropos-symbol-button-display-help) Note the :type change for the option. The current :type of `face' is incorrect - in all of the apropos.el face options (another bug). The doc strings for these face options, and some of the code that uses them, expect that the value can be nil, meaning to use no face. This probably dates from ancient defvars, before defcustom. But the defcustom :type is `face' for each of them, which precludes using nil as the value. You cannot edit the value to `nil' and then use that, because `nil' is not a face. And if you use (setq apropos-symbol-face nil) then Customize shows a type mismatch. Note too this comment in the code of `apropos-print', which cries out for the fix this bug requests: ;; Can't use default, since user may have changed the variable! ;; Just say `no' to variables containing faces! And note the bugged code of `apropos-describe-plist', which in fact tests whether variable `apropos-symbol-face' is nil (which it cannot be without mismatching its :type). In sum, please consider biting the bullet and getting rid of these face options. From unknown Tue Jun 24 22:40:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8396: 24.0.50; why use options (vars) instead of faces for apropos? Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Apr 2012 15:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8396 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Drew Adams" Cc: 8396@debbugs.gnu.org Received: via spool by 8396-submit@debbugs.gnu.org id=B8396.13351956188966 (code B ref 8396); Mon, 23 Apr 2012 15:41:02 +0000 Received: (at 8396) by debbugs.gnu.org; 23 Apr 2012 15:40:18 +0000 Received: from localhost ([127.0.0.1]:49152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SMLNC-0002KZ-O3 for submit@debbugs.gnu.org; Mon, 23 Apr 2012 11:40:18 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34725 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SMLNB-0002KS-Gs for 8396@debbugs.gnu.org; Mon, 23 Apr 2012 11:40:18 -0400 Received: from bb116-14-12-6.singnet.com.sg ([116.14.12.6]:45380 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SMLMT-0003Eh-3t; Mon, 23 Apr 2012 11:39:33 -0400 From: Chong Yidong References: <2F4E512F2C714C4EA5E50E94777DC22A@us.oracle.com> Date: Mon, 23 Apr 2012 23:39:26 +0800 In-Reply-To: <2F4E512F2C714C4EA5E50E94777DC22A@us.oracle.com> (Drew Adams's message of "Thu, 31 Mar 2011 10:16:14 -0700") Message-ID: <87wr565ufl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) "Drew Adams" writes: > Throughout apropos.el, we use `defcustom's instead of `defface's for > customizing the faces used. Why? Fixed now in trunk. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 23 11:40:30 2012 Received: (at control) by debbugs.gnu.org; 23 Apr 2012 15:40:30 +0000 Received: from localhost ([127.0.0.1]:49155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SMLNN-0002L1-Th for submit@debbugs.gnu.org; Mon, 23 Apr 2012 11:40:30 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34729 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SMLNM-0002Kt-Sc for control@debbugs.gnu.org; Mon, 23 Apr 2012 11:40:29 -0400 Received: from bb116-14-12-6.singnet.com.sg ([116.14.12.6]:45381 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SMLMf-0003FG-Hf for control@debbugs.gnu.org; Mon, 23 Apr 2012 11:39:46 -0400 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 8396 Date: Mon, 23 Apr 2012 23:39:39 +0800 Message-ID: <87pqaycv9g.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 8396 thanks