# HG changeset patch # User Markus Rost # Date 1042151544 0 # Node ID 697ca5db73b847860b5c0ed1e7aa6f315a43152b # Parent 7ce72b4a2d94bb643c38e7f08b2ca9ff521d483c (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. diff -r 7ce72b4a2d94 -r 697ca5db73b8 lisp/cus-edit.el --- a/lisp/cus-edit.el Thu Jan 09 15:21:57 2003 +0000 +++ b/lisp/cus-edit.el Thu Jan 09 22:32:24 2003 +0000 @@ -874,7 +874,6 @@ (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 @@ (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 @@ (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 @@ (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 @@ ?\ )) ;; 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 @@ 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 "--"