Mercurial > hg > xemacs-beta
diff lisp/custom/cus-face.el @ 32:e04119814345 r19-15b99
Import from CVS: tag r19-15b99
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:52:56 +0200 |
parents | ec9a17fef872 |
children | d620409f5eb8 |
line wrap: on
line diff
--- a/lisp/custom/cus-face.el Mon Aug 13 08:52:30 2007 +0200 +++ b/lisp/custom/cus-face.el Mon Aug 13 08:52:56 2007 +0200 @@ -4,7 +4,7 @@ ;; ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: help, faces -;; Version: 1.59 +;; Version: 1.63 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ ;;; Commentary: @@ -207,8 +207,7 @@ (unless (get face 'factory-face) (put face 'factory-face spec) (when (fboundp 'facep) - (unless (and (custom-facep face) - (not (get face 'saved-face))) + (unless (custom-facep face) ;; If the user has already created the face, respect that. (let ((value (or (get face 'saved-face) spec)) (frames (custom-relevant-frames)) @@ -243,9 +242,11 @@ Control whether the text should be underlined.") set-face-underline-p) (:foreground (color :tag "Foreground" + :value "black" :help-echo "Set foreground color.") set-face-foreground) (:background (color :tag "Background" + :value "white" :help-echo "Set background color.") set-face-background) (:invert (const :format "Invert Face\n" @@ -308,14 +309,14 @@ (let* ((font (apply 'face-font-name face args)) (fontobj (font-create-object font))) (set-font-size fontobj size) - (apply 'set-face-font face fontobj args))) + (apply 'font-set-face-font face fontobj args))) (defun custom-set-face-font-family (face family &rest args) "Set the font of FACE to FAMILY" (let* ((font (apply 'face-font-name face args)) (fontobj (font-create-object font))) (set-font-family fontobj family) - (apply 'set-face-font face fontobj args))) + (apply 'font-set-face-font face fontobj args))) (nconc custom-face-attributes '((:family (editable-field :format "Font Family: %v" @@ -461,7 +462,8 @@ (now (nth 2 entry))) (put face 'saved-face spec) (when now - (put face 'force-face t) + (put face 'force-face t)) + (when (or now (custom-facep face)) (when (fboundp 'copy-face) (copy-face 'custom-face-empty face)) (custom-face-display-set face spec))