;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: help, faces
-;; Version: 1.48
+;; Version: 1.55
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Commentary:
;;; Code:
-(require 'custom)
+(require 'cus-face)
(require 'wid-edit)
(require 'easymenu)
(unless custom-mode-map
(setq custom-mode-map (make-sparse-keymap))
- (set-keymap-parent custom-mode-map widget-keymap))
+ (set-keymap-parent custom-mode-map widget-keymap)
+ (define-key custom-mode-map "q" 'bury-buffer))
(easy-menu-define custom-mode-menu
custom-mode-map
:sample-face 'custom-face-tag-face
:help-echo "Push me to set or reset this face."
:documentation-property '(lambda (face)
- (get-face-documentation face))
+ (face-doc-string face))
:value-create 'custom-face-value-create
:action 'custom-face-action
:custom-set 'custom-face-set
(child (car (widget-get widget :children)))
(value (widget-value child)))
(put symbol 'customized-face value)
+ (when (fboundp 'copy-face)
+ (copy-face 'custom-face-empty symbol))
(custom-face-display-set symbol value)
(custom-face-state-set widget)
(custom-redraw-magic widget)))
(let* ((symbol (widget-value widget))
(child (car (widget-get widget :children)))
(value (widget-value child)))
+ (when (fboundp 'copy-face)
+ (copy-face 'custom-face-empty symbol))
(custom-face-display-set symbol value)
(put symbol 'saved-face value)
(put symbol 'customized-face nil)
(unless value
(error "No saved value for this face"))
(put symbol 'customized-face nil)
+ (when (fboundp 'copy-face)
+ (copy-face 'custom-face-empty symbol))
(custom-face-display-set symbol value)
(widget-value-set child value)
(custom-face-state-set widget)
(when (get symbol 'saved-face)
(put symbol 'saved-face nil)
(custom-save-all))
+ (when (fboundp 'copy-face)
+ (copy-face 'custom-face-empty symbol))
(custom-face-display-set symbol value)
(widget-value-set child value)
(custom-face-state-set widget)