Function: custom-menu-filter

custom-menu-filter is a byte-compiled function defined in cus-edit.el.gz.

Signature

(custom-menu-filter MENU WIDGET)

Documentation

Convert MENU to the form used by widget-choose.

MENU should be in the same format as custom-variable-menu. WIDGET is the widget to apply the filter entries of MENU on.

Source Code

;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
(defun custom-menu-filter (menu widget)
  "Convert MENU to the form used by `widget-choose'.
MENU should be in the same format as `custom-variable-menu'.
WIDGET is the widget to apply the filter entries of MENU on."
  (let ((result nil)
	current name action filter)
    (while menu
      (setq current (car menu)
	    name (nth 0 current)
	    action (nth 1 current)
	    filter (nth 2 current)
	    menu (cdr menu))
      (if (or (null filter) (funcall filter widget))
	  (push (cons name action) result)
	(push name result)))
    (nreverse result)))