summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorMarkus Rost <rost@math.uni-bielefeld.de>2003-01-09 22:32:48 +0000
committerMarkus Rost <rost@math.uni-bielefeld.de>2003-01-09 22:32:48 +0000
commit2de2cb02c92c915fd9ba9060ff6c63180591af7b (patch)
treecbc5ca2c3334d2ec0bfceb262ed1ea1c37c65351 /lisp/cus-edit.el
parent4fdb45538890d6016e38f100ac1567409ef27e90 (diff)
downloademacs-2de2cb02c92c915fd9ba9060ff6c63180591af7b.tar.gz
(customize-group, customize-group-other-window):
Remove unnecessary calls to custom-load-symbol. (custom-group-value-create): Load widget deps if state is not hidden. If widget deps are loaded, load them in advance. (custom-menu-create): If widget deps are loaded, load them earlier.
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 6017e7b9adf..b13c7965882 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -874,7 +874,6 @@ then prompt for the MODE to customize."
(if (string-equal "" group)
(setq group 'emacs)
(setq group (intern group))))
- (custom-load-symbol group)
(let ((name (format "*Customize Group: %s*"
(custom-unlispify-tag-name group))))
(if (get-buffer name)
@@ -898,7 +897,6 @@ then prompt for the MODE to customize."
(if (string-equal "" group)
(setq group 'emacs)
(setq group (intern group))))
- (custom-load-symbol group)
(let ((name (format "*Customize Group: %s*"
(custom-unlispify-tag-name group))))
(if (get-buffer name)
@@ -3301,6 +3299,8 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
(defun custom-group-value-create (widget)
"Insert a customize group for WIDGET in the current buffer."
+ (unless (eq (widget-get widget :custom-state) 'hidden)
+ (custom-load-widget widget))
(let* ((state (widget-get widget :custom-state))
(level (widget-get widget :custom-level))
;; (indent (widget-get widget :indent))
@@ -3340,7 +3340,6 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
(widget-put widget :buttons buttons))
((eq custom-buffer-style 'tree)
(custom-browse-insert-prefix prefix)
- (custom-load-widget widget)
(if (zerop (length members))
(progn
(custom-browse-insert-prefix prefix)
@@ -3481,7 +3480,6 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
?\ ))
;; Members.
(message "Creating group...")
- (custom-load-widget widget)
(let* ((members (custom-sort-items members
custom-buffer-sort-alphabetically
custom-buffer-order-groups))
@@ -3953,13 +3951,14 @@ The menu is in a format applicable to `easy-menu-define'."
t)))
(if (and (or (not (boundp 'custom-menu-nesting))
(>= custom-menu-nesting 0))
- (< (length (get symbol 'custom-group)) widget-menu-max-size))
+ (progn
+ (custom-load-symbol symbol)
+ (< (length (get symbol 'custom-group)) widget-menu-max-size)))
(let ((custom-prefix-list (custom-prefix-add symbol
custom-prefix-list))
(members (custom-sort-items (get symbol 'custom-group)
custom-menu-sort-alphabetically
custom-menu-order-groups)))
- (custom-load-symbol symbol)
`(,(custom-unlispify-menu-entry symbol t)
,item
"--"