/[emacs]/emacs/lisp/cus-edit.el
ViewVC logotype

Diff of /emacs/lisp/cus-edit.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.152 by rms, Sat Apr 27 03:14:21 2002 UTC revision 1.153 by rms, Sun Apr 28 03:24:20 2002 UTC
# Line 1836  and `face'." Line 1836  and `face'."
1836            (t            (t
1837             (funcall show widget value)))))             (funcall show widget value)))))
1838    
 (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))))))))  
   
1839  (defun custom-load-widget (widget)  (defun custom-load-widget (widget)
1840    "Load all dependencies for WIDGET."    "Load all dependencies for WIDGET."
1841    (custom-load-symbol (widget-value widget)))    (custom-load-symbol (widget-value widget)))

Legend:
Removed from v.1.152  
changed lines
  Added in v.1.153

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26