Function: elisp-scope-define-analyzer
elisp-scope-define-analyzer is a macro defined in elisp-scope.el.gz.
Signature
(elisp-scope-define-analyzer FSYM ARGS &rest BODY)
Documentation
Define an analyzer function for function/macro FSYM.
FSYM is a symbol, or a list of symbols that all share the same analyzer. ARGS is the arguments list of the analyzer function, and BODY is its body.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/elisp-scope.el.gz
(defmacro elisp-scope-define-analyzer (fsym args &rest body)
"Define an analyzer function for function/macro FSYM.
FSYM is a symbol, or a list of symbols that all share the same analyzer.
ARGS is the arguments list of the analyzer function, and BODY is its body."
(declare (indent defun))
(let* ((syms (ensure-list fsym))
(fsym (car syms))
(analyzer (intern (concat "elisp-scope--analyze-" (symbol-name fsym)))))
`(progn
(defun ,analyzer ,args ,@body)
. ,(mapcar (lambda (sym)
`(put ',sym 'elisp-scope-analyzer #',analyzer))
syms))))