Function: gnus-category-make-function-1
gnus-category-make-function-1 is a byte-compiled function defined in
gnus-agent.el.gz.
Signature
(gnus-category-make-function-1 PREDICATE)
Documentation
Make a function from PREDICATE.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-agent.el.gz
(defun gnus-category-make-function-1 (predicate)
"Make a function from PREDICATE."
(cond
;; Functions are just returned as is.
((or (symbolp predicate)
(functionp predicate))
`(,(or (cdr (assq predicate gnus-category-predicate-alist))
predicate)))
;; More complex predicate.
((consp predicate)
`(,(cond
((memq (car predicate) '(& and))
'and)
((memq (car predicate) '(| or))
'or)
((memq (car predicate) gnus-category-not)
'not))
,@(mapcar #'gnus-category-make-function-1 (cdr predicate))))
(t
(error "Unknown predicate type: %s" predicate))))