[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Customizing faces with `defcustom'
From: |
Per Abrahamsen |
Subject: |
Re: Customizing faces with `defcustom' |
Date: |
Wed, 30 Nov 2005 10:15:19 +0100 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) |
The cpp "faces" can be either true faces, or the special keyword
"invisible".
2005-11-30 Per Abrahamsen <address@hidden>
* 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)