diff options
| author | Richard M. Stallman | 1997-08-04 06:10:46 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-04 06:10:46 +0000 |
| commit | 212a75c49a3f0adb6ab944772ea42cc31b5fa934 (patch) | |
| tree | cd1410a77a71934658d75ad60e025afaf863d150 /lisp/progmodes/cpp.el | |
| parent | 18195655171cb15b350439de2404e2070aaa8574 (diff) | |
| download | emacs-212a75c49a3f0adb6ab944772ea42cc31b5fa934.tar.gz emacs-212a75c49a3f0adb6ab944772ea42cc31b5fa934.zip | |
(cpp-create-bg-face): Don't really make a face.
Just make (background-color . COLOR).
(cpp-highlight-buffer): Don't die if buffer-invisibility-spec is t.
(cpp-face-default-list): Doc fix, fix custom type.
Diffstat (limited to 'lisp/progmodes/cpp.el')
| -rw-r--r-- | lisp/progmodes/cpp.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 8510a150889..618e5f24571 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el | |||
| @@ -131,8 +131,12 @@ Each entry is a list with the following elements: | |||
| 131 | ("both" . both))) | 131 | ("both" . both))) |
| 132 | 132 | ||
| 133 | (defcustom cpp-face-default-list nil | 133 | (defcustom cpp-face-default-list nil |
| 134 | "List of faces you can choose from for cpp conditionals." | 134 | "Alist of faces you can choose from for cpp conditionals. |
| 135 | :type '(repeat face) | 135 | Each element has the form (STRING . FACE), where STRING |
| 136 | serves as a name (for `cpp-highlight-buffer' only) | ||
| 137 | and FACE is either a face (a symbol) | ||
| 138 | or a cons cell (background-color . COLOR)." | ||
| 139 | :type '(repeat (cons string (choice face (cons (const background-color) string)))) | ||
| 136 | :group 'cpp) | 140 | :group 'cpp) |
| 137 | 141 | ||
| 138 | (defcustom cpp-face-light-name-list | 142 | (defcustom cpp-face-light-name-list |
| @@ -204,7 +208,8 @@ This command pops up a buffer which you should edit to specify | |||
| 204 | what kind of highlighting to use, and the criteria for highlighting. | 208 | what kind of highlighting to use, and the criteria for highlighting. |
| 205 | A prefix arg suppresses display of that buffer." | 209 | A prefix arg suppresses display of that buffer." |
| 206 | (interactive "P") | 210 | (interactive "P") |
| 207 | (unless (memq 'cpp buffer-invisibility-spec) | 211 | (unless (or (eq t buffer-invisibility-spec) |
| 212 | (memq 'cpp buffer-invisibility-spec)) | ||
| 208 | (add-to-invisibility-spec 'cpp)) | 213 | (add-to-invisibility-spec 'cpp)) |
| 209 | (setq cpp-parse-symbols nil) | 214 | (setq cpp-parse-symbols nil) |
| 210 | (cpp-parse-reset) | 215 | (cpp-parse-reset) |
| @@ -788,10 +793,7 @@ BRANCH should be either nil (false branch), t (true branch) or 'both." | |||
| 788 | 793 | ||
| 789 | (defun cpp-create-bg-face (color) | 794 | (defun cpp-create-bg-face (color) |
| 790 | ;; Create entry for face with background COLOR. | 795 | ;; Create entry for face with background COLOR. |
| 791 | (let ((name (intern (concat "cpp " color)))) | 796 | (cons color (cons 'background-color color))) |
| 792 | (make-face name) | ||
| 793 | (set-face-background name color) | ||
| 794 | (cons color name))) | ||
| 795 | 797 | ||
| 796 | (cpp-choose-default-face (if window-system cpp-face-type 'none)) | 798 | (cpp-choose-default-face (if window-system cpp-face-type 'none)) |
| 797 | 799 | ||