From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Per Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Customizing faces with `defcustom' Date: Wed, 30 Nov 2005 10:15:19 +0100 Organization: The Church of Emacs Message-ID: References: <43103F48.1020804@gmx.at> <4313F4CB.10200@gmx.at> <4375A332.6070000@gmx.at> <87fyperhgd.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133360153 21462 80.91.229.2 (30 Nov 2005 14:15:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2005 14:15:53 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 30 15:15:50 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EhQql-0005sj-VY for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2005 13:14:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhQql-0000xy-8k for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2005 07:14:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EhO9r-00031F-UZ for emacs-devel@gnu.org; Wed, 30 Nov 2005 04:21:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EhO87-0002my-CT for emacs-devel@gnu.org; Wed, 30 Nov 2005 04:20:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhO3g-0002ZI-7S for emacs-devel@gnu.org; Wed, 30 Nov 2005 04:15:26 -0500 Original-Received: from [130.225.40.227] (helo=sheridan.dina.kvl.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EhO3e-000776-F1; Wed, 30 Nov 2005 04:15:22 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by sheridan.dina.kvl.dk (Postfix) with ESMTP id 2F1DA13D1E; Wed, 30 Nov 2005 10:15:20 +0100 (CET) Original-Received: from sheridan.dina.kvl.dk ([127.0.0.1]) by localhost (sheridan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29549-05; Wed, 30 Nov 2005 10:15:19 +0100 (CET) Original-Received: by sheridan.dina.kvl.dk (Postfix, from userid 304) id 3FEE513CEA; Wed, 30 Nov 2005 10:15:19 +0100 (CET) Original-To: Juri Linkov , rms@gnu.org, rudalics@gmx.at, emacs-devel@gnu.org X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM|8MBp/ In-Reply-To: <87fyperhgd.fsf@jurta.org> (Juri Linkov's message of "Wed, 30 Nov 2005 04:44:14 +0200") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at dina.kvl.dk 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:46808 Archived-At: The cpp "faces" can be either true faces, or the special keyword "invisible". 2005-11-30 Per Abrahamsen * progmodes/cpp.el (cpp-face): New widget. (cpp-known-face, cpp-unknown-face, cpp-edit-list): Use it. *** cpp.el.~1.28.~ 2003-10-24 15:35:06.000000000 +0200 --- cpp.el 2005-11-30 10:11:27.000000000 +0100 *************** *** 57,70 **** :type 'file :group 'cpp) (defcustom cpp-known-face 'invisible "*Face used for known cpp symbols." ! :type 'face :group 'cpp) (defcustom cpp-unknown-face 'highlight "*Face used for unknown cpp symbols." ! :type 'face :group 'cpp) (defcustom cpp-face-type 'light --- 57,75 ---- :type 'file :group 'cpp) + + (define-widget 'cpp-face 'lazy + "Either a face or the special symbol 'invisible'." + :type '(choice (const invisible) (face))) + (defcustom cpp-known-face 'invisible "*Face used for known cpp symbols." ! :type 'cpp-face :group 'cpp) (defcustom cpp-unknown-face 'highlight "*Face used for unknown cpp symbols." ! :type 'cpp-face :group 'cpp) (defcustom cpp-face-type 'light *************** *** 93,102 **** 1. Face used for text that is `ifdef' the macro. 2. Face used for text that is `ifndef' the macro. 3. t, nil, or `both' depending on what text may be edited." ! :type '(repeat (list string face face ! (choice (const t) ! (const nil) ! (const both)))) :group 'cpp) (defvar cpp-overlay-list nil) --- 98,109 ---- 1. Face used for text that is `ifdef' the macro. 2. Face used for text that is `ifndef' the macro. 3. t, nil, or `both' depending on what text may be edited." ! :type '(repeat (list (string :tag "Macro") ! (cpp-face :tag "True") ! (cpp-face :tag "False") ! (choice (const :tag "True branch writable" t) ! (const :tag "false branch writeable" nil) ! (const :tag "Both branches writeable" both)))) :group 'cpp) (defvar cpp-overlay-list nil)