Function: custom-menu-create
custom-menu-create is an autoloaded and byte-compiled function defined
in cus-edit.el.gz.
Signature
(custom-menu-create SYMBOL)
Documentation
Create menu for customization group SYMBOL.
The menu is in a format applicable to easy-menu-define.
Source Code
;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
;;;###autoload
(defun custom-menu-create (symbol)
"Create menu for customization group SYMBOL.
The menu is in a format applicable to `easy-menu-define'."
(let* ((deactivate-mark nil)
(item (vector (custom-unlispify-menu-entry symbol)
`(customize-group ',symbol)
t)))
(if (and (or (not (boundp 'custom-menu-nesting))
(>= custom-menu-nesting 0))
(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-unlispify-menu-entry symbol t)
,item
"--"
,@(mapcar (lambda (entry)
(widget-apply (if (listp (nth 1 entry))
(nth 1 entry)
(list (nth 1 entry)))
:custom-menu (nth 0 entry)))
members)))
item)))