summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-05-31 02:47:47 +0000
committerRichard M. Stallman <rms@gnu.org>1997-05-31 02:47:47 +0000
commit662e3c52362dc0d9444229122315e9ab33d2f060 (patch)
tree99c387f7845c923d66033766fbc6af77973cd10c /lisp/cus-edit.el
parent9f9fd41276a75115600aae3b71f5d5a3cb6bcc83 (diff)
downloademacs-662e3c52362dc0d9444229122315e9ab33d2f060.tar.gz
(custom-load-symbol): Simplify previous change.
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 25843805497..e15a39a015c 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1306,10 +1306,15 @@ Change the state of this item."
(condition-case nil
(require load)
(error nil)))
- ((assoc load load-history))
+ ;; Don't reload a file already loaded.
+ ((assoc (locate-library load) load-history))
(t
(condition-case nil
- (load-library load)
+ ;; 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.
+ (or (equal load "cus-edit")
+ (load-library load))
(error nil))))))))
(defun custom-load-widget (widget)