Function: elisp-scope-define-function-spec

elisp-scope-define-function-spec is a macro defined in elisp-scope.el.gz.

Signature

(elisp-scope-define-function-spec FSYM ARG-SPECS &optional REST-SPEC)

Documentation

Specify how to analyze arguments of FSYM.

FSYM is a function symbol or a list of function symbols, and ARG-SPECS is a list of output specs corresponding to the arguments of FSYM. Optional argument REST-SPEC is the output spec of any remaining arguments after those specified by ARG-SPECS.

For example, the following form says that the functions foo and bar take a face name as their second argument, and that all arguments after the second are macro names. The first argument remains unspecified.

  (elisp-scope-define-function-spec (foo bar)
   (nil (symbol . face))
   (symbol . macro))

Probably introduced at or before Emacs version 32.1.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/elisp-scope.el.gz
(defmacro elisp-scope-define-function-spec (fsym arg-specs &optional rest-spec)
  "Specify how to analyze arguments of FSYM.
FSYM is a function symbol or a list of function symbols, and ARG-SPECS
is a list of output specs corresponding to the arguments of FSYM.
Optional argument REST-SPEC is the output spec of any remaining
arguments after those specified by ARG-SPECS.

For example, the following form says that the functions `foo' and `bar'
take a face name as their second argument, and that all arguments after
the second are macro names.  The first argument remains unspecified.

  (elisp-scope-define-function-spec (foo bar)
   (nil (symbol . face))
   (symbol . macro))"
  (declare (indent 1))
  `(elisp-scope-define-function-analyzer ,fsym (&rest args)
     (elisp-scope--analyze-function-args args ',arg-specs ',rest-spec)))