From 46620558210c52a6ca510a77f2ae3bfc48941a05 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Fri, 23 Oct 1998 09:50:24 +0000 Subject: Replaced remaining face defs with defface calls. Removed font-lock- with proof- so we know where things come from and won't break future font locks. --- coq/coq-syntax.el | 8 ++--- generic/proof-config.el | 64 +++++++++++++++++++++++++++++++++-- generic/proof-shell.el | 6 ++-- generic/proof-syntax.el | 88 +++++++++++++++++++++++++------------------------ isa/isa-syntax.el | 8 ++--- lego/lego-syntax.el | 4 +-- 6 files changed, 120 insertions(+), 58 deletions(-) diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el index 4e1c8c14..ba5fc09b 100644 --- a/coq/coq-syntax.el +++ b/coq/coq-syntax.el @@ -167,10 +167,10 @@ (list ;; lambda binders - (list (coq-abstr-regexp "\\[" ":") 1 'font-lock-declaration-name-face) + (list (coq-abstr-regexp "\\[" ":") 1 'proof-declaration-name-face) ;; Pi binders - (list (coq-abstr-regexp "(" ":") 1 'font-lock-declaration-name-face) + (list (coq-abstr-regexp "(" ":") 1 'proof-declaration-name-face) ;; Kinds (cons (concat "\\\\|\\\\|\\-face. -;; FIXME 2: use defface here - -(defun proof-have-color () - "Do we have support for colour?" - (or (and (fboundp 'device-class) - (eq (device-class (frame-device)) 'color)) - (and (fboundp 'x-display-color-p) (x-display-color-p)))) - -(defvar font-lock-declaration-name-face -(progn - (cond - ((proof-have-color) - (copy-face 'bold 'font-lock-declaration-name-face) - - ;; Emacs 19.28 compiles this down to - ;; internal-set-face-1. This is not compatible with XEmacs - (set-face-foreground - 'font-lock-declaration-name-face "chocolate")) - (t (copy-face 'bold-italic 'font-lock-declaration-name-face))))) + +;; FACES have been moved to proof-config. +;; Old code left here while testing. + +;(defun proof-have-color () +; "Do we have support for colour?" +; (or (and (fboundp 'device-class) +; (eq (device-class (frame-device)) 'color)) +; (and (fboundp 'x-display-color-p) (x-display-color-p)))) + +;(defvar font-lock-declaration-name-face +;(progn +; (cond +; ((proof-have-color) +; (copy-face 'bold 'font-lock-declaration-name-face) + +; ;; Emacs 19.28 compiles this down to +; ;; internal-set-face-1. This is not compatible with XEmacs +; (set-face-foreground +; 'font-lock-declaration-name-face "chocolate")) +; (t (copy-face 'bold-italic 'font-lock-declaration-name-face))))) ;; (if running-emacs19 ;; (setq font-lock-declaration-name-face ;; (face-name 'font-lock-declaration-name-face)) -(defvar font-lock-tacticals-name-face -(if (proof-have-color) - (let ((face (make-face 'font-lock-tacticals-name-face))) - (dont-compile - (set-face-foreground face "MediumOrchid3")) - face) - (copy-face 'bold 'font-lock-tacticals-name-face))) - -(defvar font-lock-error-face - (let ((face (make-face 'font-lock-error-face))) - (copy-face 'bold 'font-lock-error-face) - (and (proof-have-color) (set-face-background face "salmon1")) - face) - "*The face for error messages.") - -(defvar font-lock-eager-annotation-face - (let ((face (make-face 'font-lock-eager-annotation-face))) - (if (proof-have-color) - (set-face-background face "lemon chiffon") - (copy-face 'italic face)) - face) - "*The face for urgent messages.") + +;(defvar font-lock-tacticals-name-face +;(if (proof-have-color) +; (let ((face (make-face 'font-lock-tacticals-name-face))) +; (dont-compile +; (set-face-foreground face "MediumOrchid3")) +; face) +; (copy-face 'bold 'font-lock-tacticals-name-face))) + +;(defvar font-lock-error-face +; (let ((face (make-face 'font-lock-error-face))) +; (copy-face 'bold 'font-lock-error-face) +; (and (proof-have-color) (set-face-background face "salmon1")) +; face) +; "*The face for error messages.") + +;(defvar font-lock-eager-annotation-face +; (let ((face (make-face 'font-lock-eager-annotation-face))) +; (if (proof-have-color) +; (set-face-background face "lemon chiffon") +; (copy-face 'italic face)) +; face) +; "*The face for urgent messages.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; A big hack to unfontify commas in declarations and definitions. ;; @@ -103,7 +105,7 @@ (goto-char start) (while (search-forward "," end t) (if (memq (get-char-property (- (point) 1) 'face) - '(font-lock-declaration-name-face + '(proof-declaration-name-face font-lock-function-name-face)) (font-lock-remove-face (- (point) 1) (point)) ))))) diff --git a/isa/isa-syntax.el b/isa/isa-syntax.el index 886a686b..93ad9758 100644 --- a/isa/isa-syntax.el +++ b/isa/isa-syntax.el @@ -111,10 +111,10 @@ (list ;; lambda binders (list (concat "\%\\s-*\\(" isa-ids "\\)\\.") 1 - 'font-lock-declaration-name-face) + 'proof-declaration-name-face) ;; Pi binders - (list (isa-abstr-regexp "(" ":") 1 'font-lock-declaration-name-face) + (list (isa-abstr-regexp "(" ":") 1 'proof-declaration-name-face) ;; Kinds (cons (concat "\\\\|\\\\|\\\\|\\