summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cpp.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/cpp.el')
-rw-r--r--lisp/progmodes/cpp.el21
1 files changed, 14 insertions, 7 deletions
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el
index c615082814a..cf119bde719 100644
--- a/lisp/progmodes/cpp.el
+++ b/lisp/progmodes/cpp.el
@@ -50,6 +50,7 @@
;;; Customization:
(defgroup cpp nil
"Highlight or hide text according to cpp conditionals."
+ :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
:group 'c
:prefix "cpp-")
@@ -58,14 +59,18 @@
: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 'face
+ :type 'cpp-face
:group 'cpp)
(defcustom cpp-unknown-face 'highlight
"*Face used for unknown cpp symbols."
- :type 'face
+ :type 'cpp-face
:group 'cpp)
(defcustom cpp-face-type 'light
@@ -94,10 +99,12 @@ Each entry is a list with the following elements:
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))))
+ :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)
@@ -182,7 +189,7 @@ or a cons cell (background-color . COLOR)."
'(("default" . default)
("invisible" . invisible))
"Alist of names and faces available even if you don't use a window system."
- :type '(repeat (cons string face))
+ :type '(repeat (cons string cpp-face))
:group 'cpp)
(defvar cpp-face-all-list