# HG changeset patch # User Richard M. Stallman # Date 870675046 0 # Node ID 35d85b50c3cb0b7ccbd3092d82c281a5184dd8b4 # Parent e789b647f15ba3a8a467b077084392155aaadc86 (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. diff -r e789b647f15b -r 35d85b50c3cb lisp/progmodes/cpp.el --- a/lisp/progmodes/cpp.el Mon Aug 04 06:07:05 1997 +0000 +++ b/lisp/progmodes/cpp.el Mon Aug 04 06:10:46 1997 +0000 @@ -131,8 +131,12 @@ ("both" . both))) (defcustom cpp-face-default-list nil - "List of faces you can choose from for cpp conditionals." - :type '(repeat face) + "Alist of faces you can choose from for cpp conditionals. +Each element has the form (STRING . FACE), where STRING +serves as a name (for `cpp-highlight-buffer' only) +and FACE is either a face (a symbol) +or a cons cell (background-color . COLOR)." + :type '(repeat (cons string (choice face (cons (const background-color) string)))) :group 'cpp) (defcustom cpp-face-light-name-list @@ -204,7 +208,8 @@ what kind of highlighting to use, and the criteria for highlighting. A prefix arg suppresses display of that buffer." (interactive "P") - (unless (memq 'cpp buffer-invisibility-spec) + (unless (or (eq t buffer-invisibility-spec) + (memq 'cpp buffer-invisibility-spec)) (add-to-invisibility-spec 'cpp)) (setq cpp-parse-symbols nil) (cpp-parse-reset) @@ -788,10 +793,7 @@ (defun cpp-create-bg-face (color) ;; Create entry for face with background COLOR. - (let ((name (intern (concat "cpp " color)))) - (make-face name) - (set-face-background name color) - (cons color name))) + (cons color (cons 'background-color color))) (cpp-choose-default-face (if window-system cpp-face-type 'none))