]> code.delx.au - gnu-emacs/blobdiff - lisp/cus-dep.el
Fix typo: @same --> @samp
[gnu-emacs] / lisp / cus-dep.el
index 4ce2932ab72124da7a5693c2a51503e7e3bb0f57..d7fd848a9abf583e10f7c68dc781bd0c45782b55 100644 (file)
@@ -1,4 +1,4 @@
-;;; cus-dep.el --- Find customization dependencies.
+;;; cus-dep.el --- find customization dependencies
 ;;
 ;; Copyright (C) 1997 Free Software Foundation, Inc.
 ;;
@@ -22,6 +22,8 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
 ;;; Code:
 
 (eval-when-compile (require 'cl))
@@ -64,7 +66,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
                          (setq is-autoloaded t)))
                    (let ((expr (read (current-buffer))))
                      (condition-case nil
-                         (progn
+                         (let ((custom-dont-initialize t))
                            (eval expr)
                            (put (nth 1 expr) 'custom-autoloaded is-autoloaded)
                            (put (nth 1 expr) 'custom-where name))
@@ -84,6 +86,10 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
              (let ((members (get symbol 'custom-group))
                    item where found)
                (when members
+                 ;; So x and no-x builds won't differ.
+                 (setq members
+                       (sort (copy-sequence members) 
+                             (lambda (x y) (string< (car x) (car y)))))
                  (while members
                    (setq item (car (car members))
                          members (cdr members)
@@ -116,7 +122,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
 ;;; variables and groups if it's already set. (We don't know when
 ;;; cus-load.el is going to be loaded and at that time some of the
 ;;; files might be loaded and some others might not).
-(defmacro custom-put-if-not (symbol propname value)
+\(defmacro custom-put-if-not (symbol propname value)
   `(unless (get ,symbol ,propname)
      (put ,symbol ,propname ,value)))