# HG changeset patch # User Glenn Morris # Date 1119450018 0 # Node ID 47c90f7c23dfe60ca2ca672f2d91ee4bee2b3952 # Parent ce9e9d1055bf5c08b391f605a0d79059d27d3461 (face-documentation, set-face-attribute) (face-spec-set): Handle face aliases. diff -r ce9e9d1055bf -r 47c90f7c23df lisp/faces.el --- a/lisp/faces.el Wed Jun 22 14:16:33 2005 +0000 +++ b/lisp/faces.el Wed Jun 22 14:20:18 2005 +0000 @@ -513,8 +513,17 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun face-documentation (face) - "Get the documentation string for FACE." - (get face 'face-documentation)) + "Get the documentation string for FACE. +If FACE is a face-alias, get the documentation for the target face." + (let ((alias (get face 'face-alias)) + doc) + (if alias + (progn + (setq doc (get alias 'face-documentation)) + (format "%s is an alias for the face `%s'.%s" face alias + (if doc (format "\n%s" doc) + ""))) + (get face 'face-documentation)))) (defun set-face-documentation (face string) @@ -661,7 +670,7 @@ (setq args (purecopy args)) ;; If we set the new-frame defaults, this face is modified outside Custom. (if (memq where '(0 t)) - (put face 'face-modified t)) + (put (or (get face 'face-alias) face) 'face-modified t)) (while args (internal-set-lisp-face-attribute face (car args) (purecopy (cadr args)) @@ -1443,7 +1452,7 @@ ;; When we reset the face based on its spec, then it is unmodified ;; as far as Custom is concerned. (if (null frame) - (put face 'face-modified nil))) + (put (or (get face 'face-alias) face) 'face-modified nil))) (defun face-attr-match-p (face attrs &optional frame)