aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-27 19:53:27 +0000
committerRichard M. Stallman1997-07-27 19:53:27 +0000
commit487e6fcbdd955bad494e5d576375e4c18b1892d2 (patch)
tree51ffa646db911c4cb3c7290ef7d84769b58f1036
parentc098c7f193e178d7b04263e09a968fc7a5e1e187 (diff)
downloademacs-487e6fcbdd955bad494e5d576375e4c18b1892d2.tar.gz
emacs-487e6fcbdd955bad494e5d576375e4c18b1892d2.zip
Customized.
-rw-r--r--lisp/facemenu.el48
-rw-r--r--lisp/progmodes/cpp.el122
2 files changed, 115 insertions, 55 deletions
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index ccf47151e29..6586b77a1fd 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -102,7 +102,12 @@
102(define-key global-map [C-down-mouse-2] 'facemenu-menu) 102(define-key global-map [C-down-mouse-2] 'facemenu-menu)
103(define-key global-map "\M-g" 'facemenu-keymap) 103(define-key global-map "\M-g" 'facemenu-keymap)
104 104
105(defvar facemenu-keybindings 105(defgroup facemenu nil
106 "Create a face menu for interactively adding fonts to text"
107 :group 'faces
108 :prefix "facemenu-")
109
110(defcustom facemenu-keybindings
106 '((default . "d") 111 '((default . "d")
107 (bold . "b") 112 (bold . "b")
108 (italic . "i") 113 (italic . "i")
@@ -119,14 +124,18 @@ except for those in `facemenu-unlisted-faces', are listed after them,
119but get no keyboard equivalents. 124but get no keyboard equivalents.
120 125
121If you change this variable after loading facemenu.el, you will need to call 126If you change this variable after loading facemenu.el, you will need to call
122`facemenu-update' to make it take effect.") 127`facemenu-update' to make it take effect."
128 :type '(repeat (cons face string))
129 :group 'facemenu)
123 130
124(defvar facemenu-new-faces-at-end t 131(defcustom facemenu-new-faces-at-end t
125 "*Where in the menu to insert newly-created faces. 132 "*Where in the menu to insert newly-created faces.
126This should be nil to put them at the top of the menu, or t to put them 133This should be nil to put them at the top of the menu, or t to put them
127just before \"Other\" at the end.") 134just before \"Other\" at the end."
135 :type 'boolean
136 :group 'facemenu)
128 137
129(defvar facemenu-unlisted-faces 138(defcustom facemenu-unlisted-faces
130 '(modeline region secondary-selection highlight scratch-face) 139 '(modeline region secondary-selection highlight scratch-face)
131 "*List of faces not to include in the Face menu. 140 "*List of faces not to include in the Face menu.
132You can set this list before loading facemenu.el, or add a face to it before 141You can set this list before loading facemenu.el, or add a face to it before
@@ -136,7 +145,11 @@ call `facemenu-update' to recalculate the menu contents.
136 145
137If this variable is t, no faces will be added to the menu. This is useful for 146If this variable is t, no faces will be added to the menu. This is useful for
138temporarily turning off the feature that automatically adds faces to the menu 147temporarily turning off the feature that automatically adds faces to the menu
139when they are created.") 148when they are created."
149 :type '(choice (const :tag "Don't add" t)
150 (const :tag "None" nil)
151 (repeat face))
152 :group 'facemenu)
140 153
141;;;###autoload 154;;;###autoload
142(defvar facemenu-face-menu 155(defvar facemenu-face-menu
@@ -242,20 +255,31 @@ requested in `facemenu-keybindings'.")
242(defalias 'facemenu-keymap facemenu-keymap) 255(defalias 'facemenu-keymap facemenu-keymap)
243 256
244 257
245(defvar facemenu-add-face-function nil 258(defcustom facemenu-add-face-function nil
246 "Function called at beginning of text to change or `nil'. 259 "Function called at beginning of text to change or `nil'.
247This function is passed the FACE to set and END of text to change, and must 260This function is passed the FACE to set and END of text to change, and must
248return a string which is inserted. It may set `facemenu-end-add-face'.") 261return a string which is inserted. It may set `facemenu-end-add-face'."
262 :type '(choice (const :tag "None" nil)
263 function)
264 :group 'facemenu)
249 265
250(defvar facemenu-end-add-face nil 266(defcustom facemenu-end-add-face nil
251 "String to insert or function called at end of text to change or `nil'. 267 "String to insert or function called at end of text to change or `nil'.
252This function is passed the FACE to set, and must return a string which is 268This function is passed the FACE to set, and must return a string which is
253inserted.") 269inserted."
270 :type '(choice (const :tag "None" nil)
271 string
272 function)
273 :group 'facemenu)
254 274
255(defvar facemenu-remove-face-function nil 275(defcustom facemenu-remove-face-function nil
256 "When non-nil, this is a function called to remove faces. 276 "When non-nil, this is a function called to remove faces.
257This function is passed the START and END of text to change. 277This function is passed the START and END of text to change.
258May also be `t' meaning to use `facemenu-add-face-function'.") 278May also be `t' meaning to use `facemenu-add-face-function'."
279 :type '(choice (const :tag "None" nil)
280 (const :tag "Use add-face" t)
281 function)
282 :group 'facemenu)
259 283
260;;; Internal Variables 284;;; Internal Variables
261 285
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el
index f5a3c912eea..8510a150889 100644
--- a/lisp/progmodes/cpp.el
+++ b/lisp/progmodes/cpp.el
@@ -47,34 +47,56 @@
47;;; Code: 47;;; Code:
48 48
49;;; Customization: 49;;; Customization:
50 50(defgroup cpp nil
51(defvar cpp-config-file (convert-standard-filename ".cpp.el") 51 "Highlight or hide text according to cpp conditionals."
52 "*File name to save cpp configuration.") 52 :group 'C
53 53 :prefix "cpp-")
54(defvar cpp-known-face 'invisible 54
55 "*Face used for known cpp symbols.") 55(defcustom cpp-config-file (convert-standard-filename ".cpp.el")
56 56 "*File name to save cpp configuration."
57(defvar cpp-unknown-face 'highlight 57 :type 'file
58 "*Face used for unknown cpp symbols.") 58 :group 'cpp)
59 59
60(defvar cpp-face-type 'light 60(defcustom cpp-known-face 'invisible
61 "*Face used for known cpp symbols."
62 :type 'face
63 :group 'cpp)
64
65(defcustom cpp-unknown-face 'highlight
66 "*Face used for unknown cpp symbols."
67 :type 'face
68 :group 'cpp)
69
70(defcustom cpp-face-type 'light
61 "*Indicate what background face type you prefer. 71 "*Indicate what background face type you prefer.
62Can be either light or dark for color screens, mono for monochrome 72Can be either light or dark for color screens, mono for monochrome
63screens, and none if you don't use a window system.") 73screens, and none if you don't use a window system."
64 74 :options '(light dark mono nil)
65(defvar cpp-known-writable t 75 :type 'symbol
66 "*Non-nil means you are allowed to modify the known conditionals.") 76 :group 'cpp)
67 77
68(defvar cpp-unknown-writable t 78(defcustom cpp-known-writable t
69 "*Non-nil means you are allowed to modify the unknown conditionals.") 79 "*Non-nil means you are allowed to modify the known conditionals."
70 80 :type 'boolean
71(defvar cpp-edit-list nil 81 :group 'cpp)
82
83(defcustom cpp-unknown-writable t
84 "*Non-nil means you are allowed to modify the unknown conditionals."
85 :type 'boolean
86 :group 'cpp)
87
88(defcustom cpp-edit-list nil
72 "Alist of cpp macros and information about how they should be displayed. 89 "Alist of cpp macros and information about how they should be displayed.
73Each entry is a list with the following elements: 90Each entry is a list with the following elements:
740. The name of the macro (a string). 910. The name of the macro (a string).
751. Face used for text that is `ifdef' the macro. 921. Face used for text that is `ifdef' the macro.
762. Face used for text that is `ifndef' the macro. 932. Face used for text that is `ifndef' the macro.
773. `t', `nil', or `both' depending on what text may be edited.") 943. `t', `nil', or `both' depending on what text may be edited."
95 :type '(repeat (list string face face
96 (choice (const t)
97 (const nil)
98 (const both))))
99 :group 'cpp)
78 100
79(defvar cpp-overlay-list nil) 101(defvar cpp-overlay-list nil)
80;; List of cpp overlays active in the current buffer. 102;; List of cpp overlays active in the current buffer.
@@ -108,38 +130,52 @@ Each entry is a list with the following elements:
108 ("true" . t) 130 ("true" . t)
109 ("both" . both))) 131 ("both" . both)))
110 132
111(defvar cpp-face-default-list nil 133(defcustom cpp-face-default-list nil
112 "List of faces you can choose from for cpp conditionals.") 134 "List of faces you can choose from for cpp conditionals."
135 :type '(repeat face)
136 :group 'cpp)
113 137
114(defvar cpp-face-light-name-list 138(defcustom cpp-face-light-name-list
115 '("light gray" "light blue" "light cyan" "light yellow" "light pink" 139 '("light gray" "light blue" "light cyan" "light yellow" "light pink"
116 "pale green" "beige" "orange" "magenta" "violet" "medium purple" 140 "pale green" "beige" "orange" "magenta" "violet" "medium purple"
117 "turquoise") 141 "turquoise")
118 "Background colours useful with dark foreground colors.") 142 "Background colours useful with dark foreground colors."
143 :type '(repeat string)
144 :group 'cpp)
119 145
120(defvar cpp-face-dark-name-list 146(defcustom cpp-face-dark-name-list
121 '("dim gray" "blue" "cyan" "yellow" "red" 147 '("dim gray" "blue" "cyan" "yellow" "red"
122 "dark green" "brown" "dark orange" "dark khaki" "dark violet" "purple" 148 "dark green" "brown" "dark orange" "dark khaki" "dark violet" "purple"
123 "dark turquoise") 149 "dark turquoise")
124 "Background colours useful with light foreground colors.") 150 "Background colours useful with light foreground colors."
125 151 :type '(repeat string)
126(defvar cpp-face-light-list nil 152 :group 'cpp)
127 "Alist of names and faces to be used for light backgrounds.") 153
128 154(defcustom cpp-face-light-list nil
129(defvar cpp-face-dark-list nil 155 "Alist of names and faces to be used for light backgrounds."
130 "Alist of names and faces to be used for dark backgrounds.") 156 :type '(repeat (cons string face))
131 157 :group 'cpp)
132(defvar cpp-face-mono-list 158
133 '(("bold" . 'bold) 159(defcustom cpp-face-dark-list nil
134 ("bold-italic" . 'bold-italic) 160 "Alist of names and faces to be used for dark backgrounds."
135 ("italic" . 'italic) 161 :type '(repeat (cons string face))
136 ("underline" . 'underline)) 162 :group 'cpp)
137 "Alist of names and faces to be used for monochrome screens.") 163
138 164(defcustom cpp-face-mono-list
139(defvar cpp-face-none-list 165 '(("bold" . bold)
166 ("bold-italic" . bold-italic)
167 ("italic" . italic)
168 ("underline" . underline))
169 "Alist of names and faces to be used for monochrome screens."
170 :type '(repeat (cons string face))
171 :group 'cpp)
172
173(defcustom cpp-face-none-list
140 '(("default" . default) 174 '(("default" . default)
141 ("invisible" . invisible)) 175 ("invisible" . invisible))
142 "Alist of names and faces available even if you don't use a window system.") 176 "Alist of names and faces available even if you don't use a window system."
177 :type '(repeat (cons string face))
178 :group 'cpp)
143 179
144(defvar cpp-face-all-list 180(defvar cpp-face-all-list
145 (append cpp-face-light-list 181 (append cpp-face-light-list