Function: edebug-match-symbol
edebug-match-symbol is a byte-compiled function defined in
edebug.el.gz.
Signature
(edebug-match-symbol CURSOR SYMBOL)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/edebug.el.gz
(defun edebug-match-symbol (cursor symbol)
;; Match a symbol spec.
(let* ((spec (edebug--get-elem-spec symbol)))
(cond
(spec
(if (consp spec)
;; It is an indirect spec.
(edebug-match cursor spec)
;; Otherwise it should be the symbol name of a function.
;; There could be a bug here - maybe need to do edebug-match bindings.
(funcall spec cursor)))
((null symbol) ;; special case this.
(edebug-match-nil cursor))
((fboundp symbol) ; is it a predicate?
(let ((sexp (edebug-top-element-required cursor "Expected" symbol)))
;; Special case for edebug-`.
(if (and (listp sexp) (eq (car sexp) '\,))
(edebug-match cursor '(("," def-form)))
(if (not (funcall symbol sexp))
(edebug-no-match cursor symbol "failed"))
(edebug-move-cursor cursor)
(list sexp))))
(t (error "%s is not a form-spec or function" symbol))
)))