# HG changeset patch # User Richard M. Stallman # Date 1019964260 0 # Node ID 4600e8f9fcdf145e7ca4120f2d467e3f9d1121fa # Parent 0edc2b27187bfcc53a5c70bfa5a10b2555248c27 (custom-load-symbol): Moved to custom.el. (custom-load-recursion): Likewise. diff -r 0edc2b27187b -r 4600e8f9fcdf lisp/cus-edit.el --- a/lisp/cus-edit.el Sun Apr 28 03:23:52 2002 +0000 +++ b/lisp/cus-edit.el Sun Apr 28 03:24:20 2002 +0000 @@ -1836,45 +1836,6 @@ (t (funcall show widget value))))) -(defvar custom-load-recursion nil - "Hack to avoid recursive dependencies.") - -;;;###autoload -(defun custom-load-symbol (symbol) - "Load all dependencies for SYMBOL." - (unless custom-load-recursion - (let ((custom-load-recursion t) - (loads (get symbol 'custom-loads)) - load) - (while loads - (setq load (car loads) - loads (cdr loads)) - (cond ((symbolp load) - (condition-case nil - (require load) - (error nil))) - ;; Don't reload a file already loaded. - ((and (boundp 'preloaded-file-list) - (member load preloaded-file-list))) - ((assoc load load-history)) - ;; This was just (assoc (locate-library load) load-history) - ;; but has been optimized not to load locate-library - ;; if not necessary. - ((let (found (regexp (regexp-quote load))) - (dolist (loaded load-history) - (and (string-match regexp (car loaded)) - (eq (locate-library load) (car loaded)) - (setq found t))) - found)) - ;; Without this, we would load cus-edit recursively. - ;; We are still loading it when we call this, - ;; and it is not in load-history yet. - ((equal load "cus-edit")) - (t - (condition-case nil - (load-library load) - (error nil)))))))) - (defun custom-load-widget (widget) "Load all dependencies for WIDGET." (custom-load-symbol (widget-value widget)))