diff options
author | Per Abrahamsen <abraham@dina.kvl.dk> | 1997-04-12 17:51:31 +0000 |
---|---|---|
committer | Per Abrahamsen <abraham@dina.kvl.dk> | 1997-04-12 17:51:31 +0000 |
commit | 428e37615462db2a52ef8a7aea6903bd3df0ce09 (patch) | |
tree | 2441ffe0d08d4bf24c1067777e8dba208332d028 /lisp/cus-face.el | |
parent | 63c7ec52512f11c8fcc3643368671181a51180e6 (diff) | |
download | emacs-428e37615462db2a52ef8a7aea6903bd3df0ce09.tar.gz |
Sync with 1.84.
Diffstat (limited to 'lisp/cus-face.el')
-rw-r--r-- | lisp/cus-face.el | 65 |
1 files changed, 20 insertions, 45 deletions
diff --git a/lisp/cus-face.el b/lisp/cus-face.el index c0d64a8ecfb..952171ca4d0 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -4,7 +4,7 @@ ;; ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: help, faces -;; Version: 1.71 +;; Version: 1.84 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ ;;; Commentary: @@ -39,7 +39,7 @@ (eval-and-compile (unless (fboundp 'frame-property) - ;; XEmacs function missing in Emacs 19.34. + ;; XEmacs function missing in Emacs. (defun frame-property (frame property &optional default) "Return FRAME's value for property PROPERTY." (or (cdr (assq property (frame-parameters frame))) @@ -49,44 +49,13 @@ ;; XEmacs function missing in Emacs. (defun face-doc-string (face) "Get the documentation string for FACE." - (get face 'face-doc-string))) + (get face 'face-documentation))) (unless (fboundp 'set-face-doc-string) ;; XEmacs function missing in Emacs. (defun set-face-doc-string (face string) "Set the documentation string for FACE to STRING." - (put face 'face-doc-string string))) - - (when (and (not (fboundp 'set-face-stipple)) - (fboundp 'set-face-background-pixmap)) - ;; Emacs function missing in XEmacs 19.15. - (defun set-face-stipple (face pixmap &optional frame) - ;; Written by Kyle Jones. - "Change the stipple pixmap of face FACE to PIXMAP. -PIXMAP should be a string, the name of a file of pixmap data. -The directories listed in the `x-bitmap-file-path' variable are searched. - -Alternatively, PIXMAP may be a list of the form (WIDTH HEIGHT DATA) -where WIDTH and HEIGHT are the size in pixels, -and DATA is a string, containing the raw bits of the bitmap. - -If the optional FRAME argument is provided, change only -in that frame; otherwise change each frame." - (while (not (find-face face)) - (setq face (signal 'wrong-type-argument (list 'facep face)))) - (while (cond ((stringp pixmap) - (unless (file-readable-p pixmap) - (setq pixmap (vector 'xbm ':file pixmap))) - nil) - ((and (consp pixmap) (= (length pixmap) 3)) - (setq pixmap (vector 'xbm ':data pixmap)) - nil) - (t t)) - (setq pixmap (signal 'wrong-type-argument - (list 'stipple-pixmap-p pixmap)))) - (while (and frame (not (framep frame))) - (setq frame (signal 'wrong-type-argument (list 'framep frame)))) - (set-face-background-pixmap face pixmap frame)))) + (put face 'face-documentation string)))) (unless (fboundp 'x-color-values) ;; Emacs function missing in XEmacs 19.14. @@ -410,7 +379,7 @@ If FRAME is nil, use the default face." "Return the size of the font of FACE as a string." (let* ((font (apply 'custom-face-font-name face args)) (fontobj (font-create-object font))) - (format "%d" (font-size fontobj)))) + (format "%s" (font-size fontobj)))) (defun custom-set-face-font-family (face family &rest args) "Set the font of FACE to FAMILY." @@ -425,17 +394,23 @@ If FRAME is nil, use the default face." (fontobj (font-create-object font))) (font-family fontobj))) - (nconc custom-face-attributes - '((:family (editable-field :format "Font Family: %v" - :help-echo "\ + (setq custom-face-attributes + (append '((:family (editable-field :format "Font Family: %v" + :help-echo "\ Name of font family to use (e.g. times).") - custom-set-face-font-family - custom-face-font-family) - (:size (editable-field :format "Size: %v" - :help-echo "\ + custom-set-face-font-family + custom-face-font-family) + (:size (editable-field :format "Size: %v" + :help-echo "\ Text size (e.g. 9pt or 2mm).") - custom-set-face-font-size - custom-face-font-size)))) + custom-set-face-font-size + custom-face-font-size) + (:strikethru (toggle :format "Strikethru: %[%v%]\n" + :help-echo "\ +Control whether the text should be strikethru.") + set-face-strikethru-p + face-strikethru-p)) + custom-face-attributes))) ;;; Frames. |