From: Eli Zaretskii Date: Thu, 13 Apr 2006 10:51:17 +0000 (+0000) Subject: (edebug-basic-spec): New function for vetting file-local form specs. X-Git-Tag: emacs-pretest-22.0.90~3156 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=65d04e76279ad7f66bbb05d1cde1f862a5f3f6bf;p=emacs.git (edebug-basic-spec): New function for vetting file-local form specs. --- diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 444c310920d..d0be3a02f65 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -258,6 +258,20 @@ Both SYMBOL and SPEC are unevaluated. The SPEC can be 0, t, a symbol edebug-form-spec )) +;;;###autoload +(defun edebug-basic-spec (spec) + "Return t if SPEC uses only extant spec symbols. +An extant spec symbol is a symbol that is not a function and has a +`edebug-form-spec' property." + (cond ((listp spec) + (catch 'basic + (while spec + (unless (edebug-basic-spec (car spec)) (throw 'basic nil)) + (setq spec (cdr spec))) + t)) + ((symbolp spec) + (unless (functionp spec) (get spec 'edebug-form-spec))))) + ;;; Utilities ;; Define edebug-gensym - from old cl.el