diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-07-27 19:53:27 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-07-27 19:53:27 +0000 |
commit | 487e6fcbdd955bad494e5d576375e4c18b1892d2 (patch) | |
tree | 51ffa646db911c4cb3c7290ef7d84769b58f1036 /lisp/progmodes/cpp.el | |
parent | c098c7f193e178d7b04263e09a968fc7a5e1e187 (diff) | |
download | emacs-487e6fcbdd955bad494e5d576375e4c18b1892d2.tar.gz |
Customized.
Diffstat (limited to 'lisp/progmodes/cpp.el')
-rw-r--r-- | lisp/progmodes/cpp.el | 122 |
1 files changed, 79 insertions, 43 deletions
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 @@ ;;; Code: ;;; Customization: - -(defvar cpp-config-file (convert-standard-filename ".cpp.el") - "*File name to save cpp configuration.") - -(defvar cpp-known-face 'invisible - "*Face used for known cpp symbols.") - -(defvar cpp-unknown-face 'highlight - "*Face used for unknown cpp symbols.") - -(defvar cpp-face-type 'light +(defgroup cpp nil + "Highlight or hide text according to cpp conditionals." + :group 'C + :prefix "cpp-") + +(defcustom cpp-config-file (convert-standard-filename ".cpp.el") + "*File name to save cpp configuration." + :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 "*Indicate what background face type you prefer. Can be either light or dark for color screens, mono for monochrome -screens, and none if you don't use a window system.") - -(defvar cpp-known-writable t - "*Non-nil means you are allowed to modify the known conditionals.") - -(defvar cpp-unknown-writable t - "*Non-nil means you are allowed to modify the unknown conditionals.") - -(defvar cpp-edit-list nil +screens, and none if you don't use a window system." + :options '(light dark mono nil) + :type 'symbol + :group 'cpp) + +(defcustom cpp-known-writable t + "*Non-nil means you are allowed to modify the known conditionals." + :type 'boolean + :group 'cpp) + +(defcustom cpp-unknown-writable t + "*Non-nil means you are allowed to modify the unknown conditionals." + :type 'boolean + :group 'cpp) + +(defcustom cpp-edit-list nil "Alist of cpp macros and information about how they should be displayed. Each entry is a list with the following elements: 0. The name of the macro (a string). 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.") +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) ;; List of cpp overlays active in the current buffer. @@ -108,38 +130,52 @@ Each entry is a list with the following elements: ("true" . t) ("both" . both))) -(defvar cpp-face-default-list nil - "List of faces you can choose from for cpp conditionals.") +(defcustom cpp-face-default-list nil + "List of faces you can choose from for cpp conditionals." + :type '(repeat face) + :group 'cpp) -(defvar cpp-face-light-name-list +(defcustom cpp-face-light-name-list '("light gray" "light blue" "light cyan" "light yellow" "light pink" "pale green" "beige" "orange" "magenta" "violet" "medium purple" "turquoise") - "Background colours useful with dark foreground colors.") + "Background colours useful with dark foreground colors." + :type '(repeat string) + :group 'cpp) -(defvar cpp-face-dark-name-list +(defcustom cpp-face-dark-name-list '("dim gray" "blue" "cyan" "yellow" "red" "dark green" "brown" "dark orange" "dark khaki" "dark violet" "purple" "dark turquoise") - "Background colours useful with light foreground colors.") - -(defvar cpp-face-light-list nil - "Alist of names and faces to be used for light backgrounds.") - -(defvar cpp-face-dark-list nil - "Alist of names and faces to be used for dark backgrounds.") - -(defvar cpp-face-mono-list - '(("bold" . 'bold) - ("bold-italic" . 'bold-italic) - ("italic" . 'italic) - ("underline" . 'underline)) - "Alist of names and faces to be used for monochrome screens.") - -(defvar cpp-face-none-list + "Background colours useful with light foreground colors." + :type '(repeat string) + :group 'cpp) + +(defcustom cpp-face-light-list nil + "Alist of names and faces to be used for light backgrounds." + :type '(repeat (cons string face)) + :group 'cpp) + +(defcustom cpp-face-dark-list nil + "Alist of names and faces to be used for dark backgrounds." + :type '(repeat (cons string face)) + :group 'cpp) + +(defcustom cpp-face-mono-list + '(("bold" . bold) + ("bold-italic" . bold-italic) + ("italic" . italic) + ("underline" . underline)) + "Alist of names and faces to be used for monochrome screens." + :type '(repeat (cons string face)) + :group 'cpp) + +(defcustom cpp-face-none-list '(("default" . default) ("invisible" . invisible)) - "Alist of names and faces available even if you don't use a window system.") + "Alist of names and faces available even if you don't use a window system." + :type '(repeat (cons string face)) + :group 'cpp) (defvar cpp-face-all-list (append cpp-face-light-list |