From 65d04e76279ad7f66bbb05d1cde1f862a5f3f6bf Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 13 Apr 2006 10:51:17 +0000 Subject: [PATCH] (edebug-basic-spec): New function for vetting file-local form specs. --- lisp/emacs-lisp/edebug.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- 2.39.2