Function: find-generic
find-generic is a byte-compiled function defined in find-cmd.el.gz.
Signature
(find-generic OPTION &optional OPER ARGCOUNT ARGS DONT-QUOTE)
Documentation
Allow an arbitrary string to be used as a form.
OPTION is the name of the form, OPER is the function used to either OR or AND multiple results together. ARGCOUNT is the minimum of args that OPTION can receive and ARGS are the arguments for OPTION. If DONT-QUOTE is non-nil, arguments are quoted for passing them to the shell.
Source Code
;; Defined in /usr/src/emacs/lisp/find-cmd.el.gz
(defun find-generic (option &optional oper argcount args dont-quote)
"Allow an arbitrary string to be used as a form.
OPTION is the name of the form, OPER is the function used to either
OR or AND multiple results together. ARGCOUNT is the minimum of
args that OPTION can receive and ARGS are the arguments for OPTION.
If DONT-QUOTE is non-nil, arguments are quoted for passing them to
the shell."
(when (and (numberp argcount) (< (length args) argcount))
(error "`%s' needs at least %d arguments" option argcount))
(let ((oper (or oper 'find-or)))
(if (and args (length args))
(funcall oper (mapcar (lambda (x)
(concat "-" option
(if dont-quote
(concat " " x " ")
(concat " "
(shell-quote-argument x)
" "))))
args))
(concat "-" option " "))))