aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/cus-edit.el31
1 files changed, 23 insertions, 8 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index aee2ef02679..655b3c83bf6 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -7,6 +7,23 @@
7;; Version: 1.84 7;; Version: 1.84
8;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ 8;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
9 9
10;; This file is part of GNU Emacs.
11
12;; GNU Emacs is free software; you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation; either version 2, or (at your option)
15;; any later version.
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs; see the file COPYING. If not, write to the
24;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25;; Boston, MA 02111-1307, USA.
26
10;;; Commentary: 27;;; Commentary:
11;; 28;;
12;; See `custom.el'. 29;; See `custom.el'.
@@ -17,6 +34,12 @@
17(require 'wid-edit) 34(require 'wid-edit)
18(require 'easymenu) 35(require 'easymenu)
19 36
37(defun custom-face-display-set (face spec &optional frame)
38 (face-spec-set face spec frame))
39
40(defun custom-display-match-frame (display frame)
41 (face-spec-set-match-display display frame))
42
20(define-widget-keywords :custom-prefixes :custom-menu :custom-show 43(define-widget-keywords :custom-prefixes :custom-menu :custom-show
21 :custom-magic :custom-state :custom-level :custom-form 44 :custom-magic :custom-state :custom-level :custom-form
22 :custom-set :custom-save :custom-reset-current :custom-reset-saved 45 :custom-set :custom-save :custom-reset-current :custom-reset-saved
@@ -1639,8 +1662,6 @@ Optional EVENT is the location for the menu."
1639 (child (car (widget-get widget :children))) 1662 (child (car (widget-get widget :children)))
1640 (value (widget-value child))) 1663 (value (widget-value child)))
1641 (put symbol 'customized-face value) 1664 (put symbol 'customized-face value)
1642 (when (fboundp 'copy-face)
1643 (copy-face 'custom-face-empty symbol))
1644 (custom-face-display-set symbol value) 1665 (custom-face-display-set symbol value)
1645 (custom-face-state-set widget) 1666 (custom-face-state-set widget)
1646 (custom-redraw-magic widget))) 1667 (custom-redraw-magic widget)))
@@ -1650,8 +1671,6 @@ Optional EVENT is the location for the menu."
1650 (let* ((symbol (widget-value widget)) 1671 (let* ((symbol (widget-value widget))
1651 (child (car (widget-get widget :children))) 1672 (child (car (widget-get widget :children)))
1652 (value (widget-value child))) 1673 (value (widget-value child)))
1653 (when (fboundp 'copy-face)
1654 (copy-face 'custom-face-empty symbol))
1655 (custom-face-display-set symbol value) 1674 (custom-face-display-set symbol value)
1656 (put symbol 'saved-face value) 1675 (put symbol 'saved-face value)
1657 (put symbol 'customized-face nil) 1676 (put symbol 'customized-face nil)
@@ -1666,8 +1685,6 @@ Optional EVENT is the location for the menu."
1666 (unless value 1685 (unless value
1667 (error "No saved value for this face")) 1686 (error "No saved value for this face"))
1668 (put symbol 'customized-face nil) 1687 (put symbol 'customized-face nil)
1669 (when (fboundp 'copy-face)
1670 (copy-face 'custom-face-empty symbol))
1671 (custom-face-display-set symbol value) 1688 (custom-face-display-set symbol value)
1672 (widget-value-set child value) 1689 (widget-value-set child value)
1673 (custom-face-state-set widget) 1690 (custom-face-state-set widget)
@@ -1684,8 +1701,6 @@ Optional EVENT is the location for the menu."
1684 (when (get symbol 'saved-face) 1701 (when (get symbol 'saved-face)
1685 (put symbol 'saved-face nil) 1702 (put symbol 'saved-face nil)
1686 (custom-save-all)) 1703 (custom-save-all))
1687 (when (fboundp 'copy-face)
1688 (copy-face 'custom-face-empty symbol))
1689 (custom-face-display-set symbol value) 1704 (custom-face-display-set symbol value)
1690 (widget-value-set child value) 1705 (widget-value-set child value)
1691 (custom-face-state-set widget) 1706 (custom-face-state-set widget)