aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Aspinall2007-12-14 12:06:33 +0000
committerDavid Aspinall2007-12-14 12:06:33 +0000
commit080c27323571b7a439f58ac5ce89ebe3d27f54f1 (patch)
tree2dc4cf61170b9924e7e82fb4cb832be3bd1d90bd
parentef1f7f21c8c78f42f9944225cee014b53f96fcfa (diff)
Move proof-face-specs here, remove proof-list-filter
-rw-r--r--generic/proof-utils.el24
1 files changed, 15 insertions, 9 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el
index 6d82ff51..85daf3ee 100644
--- a/generic/proof-utils.el
+++ b/generic/proof-utils.el
@@ -59,15 +59,21 @@ Return nil if not a script buffer or if no active scripting buffer."
(file-error nil))
(featurep symbol))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Handy functions ; should perhaps be elsewhere ?
-
-(defun proof-list-filter (l test)
- "Build a list containing elements of L satifying predicate test."
- (if (null l) nil
- (if (funcall test (car l)) (cons (car l) (proof-list-filter (cdr l) test))
- (proof-list-filter (cdr l) test))))
+(defmacro proof-face-specs (bl bd ow)
+ "Return a spec for `defface' with BL for light bg, BD for dark, OW o/w."
+ `(append
+ (apply 'append
+ (mapcar
+ (lambda (ty) (list
+ (list (list (list 'type ty) '(class color)
+ (list 'background 'light))
+ (quote ,bl))
+ (list (list (list 'type ty) '(class color)
+ (list 'background 'dark))
+ (quote ,bd))))
+ ;; NOTE: see proof-compat.el for possible window-system values
+ pg-defface-window-systems))
+ (list (list t (quote ,ow)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;