Function: msb--create-function-info
msb--create-function-info is a byte-compiled function defined in
msb.el.gz.
Signature
(msb--create-function-info MENU-COND-ELT)
Documentation
Create a vector from an element MENU-COND-ELT of msb-menu-cond.
This takes the form:
[BUFFER-LIST-VARIABLE CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLER SORTER]
See msb-menu-cond for a description of its elements.
Source Code
;; Defined in /usr/src/emacs/lisp/msb.el.gz
(defun msb--create-function-info (menu-cond-elt)
"Create a vector from an element MENU-COND-ELT of `msb-menu-cond'.
This takes the form:
[BUFFER-LIST-VARIABLE CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLER SORTER]
See `msb-menu-cond' for a description of its elements."
(let* ((list-symbol (make-symbol "-msb-buffer-list"))
(tmp-ih (and (> (length menu-cond-elt) 3)
(nth 3 menu-cond-elt)))
(item-handler (if (and tmp-ih (fboundp tmp-ih))
tmp-ih
msb-item-handling-function))
(tmp-s (if (> (length menu-cond-elt) 4)
(nth 4 menu-cond-elt)
msb-item-sort-function))
(sorter (if (or (fboundp tmp-s)
(null tmp-s)
(eq tmp-s t))
tmp-s
msb-item-sort-function)))
(when (< (length menu-cond-elt) 3)
(error "Wrong format of msb-menu-cond"))
(when (and (> (length menu-cond-elt) 3)
(not (fboundp tmp-ih)))
(signal 'invalid-function (list tmp-ih)))
(when (and (> (length menu-cond-elt) 4)
tmp-s
(not (fboundp tmp-s))
(not (eq tmp-s t)))
(signal 'invalid-function (list tmp-s)))
(set list-symbol ())
(vector list-symbol ;BUFFER-LIST-VARIABLE
(nth 0 menu-cond-elt) ;CONDITION
(nth 1 menu-cond-elt) ;SORT-KEY
(nth 2 menu-cond-elt) ;MENU-TITLE
item-handler ;ITEM-HANDLER
sorter) ;SORTER
))