]> code.delx.au - gnu-emacs/blobdiff - lisp/custom.el
(ucs-names): New internal variable.
[gnu-emacs] / lisp / custom.el
index bbee71ecf1fb41434805bfbf4d17347943e89760..22b6b20aa9b4829c75922e6149f1a2d4e39bff4b 100644 (file)
@@ -1,7 +1,7 @@
 ;;; custom.el --- tools for declaring and initializing options
 ;;
 ;; Copyright (C) 1996, 1997, 1999, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Maintainer: FSF
@@ -9,10 +9,10 @@
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,9 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 ;;
@@ -900,7 +898,7 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')."
                   (memq (get symbol 'custom-autoload) '(nil noset)))
         ;; This symbol needs to be autoloaded, even just for a `set'.
         (custom-load-symbol symbol))))
+
   ;; Move minor modes and variables with explicit requires to the end.
   (setq args
        (sort args
@@ -913,6 +911,8 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')."
                         (error "Circular custom dependency between `%s' and `%s'"
                                sym1 sym2))
                        (2-then-1 nil)
+                       ;; 1 is a dependency of 2, so needs to be set first.
+                       (1-then-2)
                        ;; Put minor modes and symbols with :require last.
                        ;; Putting minor modes last ensures that the mode
                        ;; function will see other customized values rather
@@ -1104,6 +1104,7 @@ This does not include the `user' theme, which is set by Customize,
 and always takes precedence over other Custom Themes."
   :group 'customize
   :type  '(repeat symbol)
+  :set-after '(custom-theme-directory)  ; so we can find the themes
   :set (lambda (symbol themes)
         ;; Avoid an infinite loop when custom-enabled-themes is
         ;; defined in a theme (e.g. `user').  Enabling the theme sets
@@ -1176,9 +1177,9 @@ This function returns nil if no custom theme specifies a value for VARIABLE."
 (defun custom-theme-recalc-face (face)
   "Set FACE according to currently enabled custom themes."
   (if (facep face)
-      (let ((theme-faces (reverse (get face 'theme-face))))
-       (dolist (spec theme-faces)
-         (face-spec-set face (cadr spec))))))
+      (face-spec-set face
+                     (get (or (get face 'face-alias) face)
+                          'face-override-spec))))
 \f
 ;;; XEmacs compability functions