diff options
| author | Richard M. Stallman | 1997-07-27 19:53:27 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-27 19:53:27 +0000 |
| commit | 487e6fcbdd955bad494e5d576375e4c18b1892d2 (patch) | |
| tree | 51ffa646db911c4cb3c7290ef7d84769b58f1036 /lisp/progmodes/cpp.el | |
| parent | c098c7f193e178d7b04263e09a968fc7a5e1e187 (diff) | |
| download | emacs-487e6fcbdd955bad494e5d576375e4c18b1892d2.tar.gz emacs-487e6fcbdd955bad494e5d576375e4c18b1892d2.zip | |
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 @@ | |||
| 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. |
| 62 | Can be either light or dark for color screens, mono for monochrome | 72 | Can be either light or dark for color screens, mono for monochrome |
| 63 | screens, and none if you don't use a window system.") | 73 | screens, 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. |
| 73 | Each entry is a list with the following elements: | 90 | Each entry is a list with the following elements: |
| 74 | 0. The name of the macro (a string). | 91 | 0. The name of the macro (a string). |
| 75 | 1. Face used for text that is `ifdef' the macro. | 92 | 1. Face used for text that is `ifdef' the macro. |
| 76 | 2. Face used for text that is `ifndef' the macro. | 93 | 2. Face used for text that is `ifndef' the macro. |
| 77 | 3. `t', `nil', or `both' depending on what text may be edited.") | 94 | 3. `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 |