aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2005-06-22 14:20:18 +0000
committerGlenn Morris2005-06-22 14:20:18 +0000
commit9a558a07bb44ec16b809c389194a3ff9d8cd96d8 (patch)
treedfecf19e460fe982ae15d5bcc5fc600137d14753
parent31c8b366fd58f2424ec0df0a61bfab5fc7ec9111 (diff)
downloademacs-9a558a07bb44ec16b809c389194a3ff9d8cd96d8.tar.gz
emacs-9a558a07bb44ec16b809c389194a3ff9d8cd96d8.zip
(face-documentation, set-face-attribute)
(face-spec-set): Handle face aliases.
-rw-r--r--lisp/faces.el17
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 39c80db8d92..0b4125dff52 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -513,8 +513,17 @@ Use `face-attribute' for finer control."
513;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 513;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
514 514
515(defun face-documentation (face) 515(defun face-documentation (face)
516 "Get the documentation string for FACE." 516 "Get the documentation string for FACE.
517 (get face 'face-documentation)) 517If FACE is a face-alias, get the documentation for the target face."
518 (let ((alias (get face 'face-alias))
519 doc)
520 (if alias
521 (progn
522 (setq doc (get alias 'face-documentation))
523 (format "%s is an alias for the face `%s'.%s" face alias
524 (if doc (format "\n%s" doc)
525 "")))
526 (get face 'face-documentation))))
518 527
519 528
520(defun set-face-documentation (face string) 529(defun set-face-documentation (face string)
@@ -661,7 +670,7 @@ like an underlying face would be, with higher priority than underlying faces."
661 (setq args (purecopy args)) 670 (setq args (purecopy args))
662 ;; If we set the new-frame defaults, this face is modified outside Custom. 671 ;; If we set the new-frame defaults, this face is modified outside Custom.
663 (if (memq where '(0 t)) 672 (if (memq where '(0 t))
664 (put face 'face-modified t)) 673 (put (or (get face 'face-alias) face) 'face-modified t))
665 (while args 674 (while args
666 (internal-set-lisp-face-attribute face (car args) 675 (internal-set-lisp-face-attribute face (car args)
667 (purecopy (cadr args)) 676 (purecopy (cadr args))
@@ -1443,7 +1452,7 @@ If SPEC is nil, do nothing."
1443 ;; When we reset the face based on its spec, then it is unmodified 1452 ;; When we reset the face based on its spec, then it is unmodified
1444 ;; as far as Custom is concerned. 1453 ;; as far as Custom is concerned.
1445 (if (null frame) 1454 (if (null frame)
1446 (put face 'face-modified nil))) 1455 (put (or (get face 'face-alias) face) 'face-modified nil)))
1447 1456
1448 1457
1449(defun face-attr-match-p (face attrs &optional frame) 1458(defun face-attr-match-p (face attrs &optional frame)