aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/cpp.el
diff options
context:
space:
mode:
authorJuri Linkov2005-12-14 07:48:11 +0000
committerJuri Linkov2005-12-14 07:48:11 +0000
commitcf717a0d2414ddaa16842429c88dc744dd68e98e (patch)
treee5e5e02e6528794f02e4c36d84a5890a2306fc07 /lisp/progmodes/cpp.el
parentad25ebbbbce7b404df074cdc2843593a3908b03a (diff)
downloademacs-cf717a0d2414ddaa16842429c88dc744dd68e98e.tar.gz
emacs-cf717a0d2414ddaa16842429c88dc744dd68e98e.zip
(cpp-face): New widget.
(cpp-known-face, cpp-unknown-face, cpp-edit-list): Use it.
Diffstat (limited to 'lisp/progmodes/cpp.el')
-rw-r--r--lisp/progmodes/cpp.el18
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el
index 11d0ba444f3..7e0bb8b4f9b 100644
--- a/lisp/progmodes/cpp.el
+++ b/lisp/progmodes/cpp.el
@@ -59,14 +59,18 @@
59 :type 'file 59 :type 'file
60 :group 'cpp) 60 :group 'cpp)
61 61
62(define-widget 'cpp-face 'lazy
63 "Either a face or the special symbol 'invisible'."
64 :type '(choice (const invisible) (face)))
65
62(defcustom cpp-known-face 'invisible 66(defcustom cpp-known-face 'invisible
63 "*Face used for known cpp symbols." 67 "*Face used for known cpp symbols."
64 :type 'face 68 :type 'cpp-face
65 :group 'cpp) 69 :group 'cpp)
66 70
67(defcustom cpp-unknown-face 'highlight 71(defcustom cpp-unknown-face 'highlight
68 "*Face used for unknown cpp symbols." 72 "*Face used for unknown cpp symbols."
69 :type 'face 73 :type 'cpp-face
70 :group 'cpp) 74 :group 'cpp)
71 75
72(defcustom cpp-face-type 'light 76(defcustom cpp-face-type 'light
@@ -95,10 +99,12 @@ Each entry is a list with the following elements:
951. Face used for text that is `ifdef' the macro. 991. Face used for text that is `ifdef' the macro.
962. Face used for text that is `ifndef' the macro. 1002. Face used for text that is `ifndef' the macro.
973. t, nil, or `both' depending on what text may be edited." 1013. t, nil, or `both' depending on what text may be edited."
98 :type '(repeat (list string face face 102 :type '(repeat (list (string :tag "Macro")
99 (choice (const t) 103 (cpp-face :tag "True")
100 (const nil) 104 (cpp-face :tag "False")
101 (const both)))) 105 (choice (const :tag "True branch writable" t)
106 (const :tag "False branch writeable" nil)
107 (const :tag "Both branches writeable" both))))
102 :group 'cpp) 108 :group 'cpp)
103 109
104(defvar cpp-overlay-list nil) 110(defvar cpp-overlay-list nil)