diff options
author | Eli Zaretskii <eliz@gnu.org> | 2006-04-13 10:51:17 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2006-04-13 10:51:17 +0000 |
commit | 65d04e76279ad7f66bbb05d1cde1f862a5f3f6bf (patch) | |
tree | d3859633d23e3ba7352554b95e478e6122ee0ef3 /lisp/emacs-lisp | |
parent | b1a569b54fafeee8236b3ec38389d793475568ca (diff) | |
download | emacs-65d04e76279ad7f66bbb05d1cde1f862a5f3f6bf.tar.gz emacs-65d04e76279ad7f66bbb05d1cde1f862a5f3f6bf.tar.bz2 emacs-65d04e76279ad7f66bbb05d1cde1f862a5f3f6bf.zip |
(edebug-basic-spec): New function for vetting file-local form specs.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/edebug.el | 14 |
1 files changed, 14 insertions, 0 deletions
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 |