From d301b4133f855c96f425b4793fa13dae3463f392 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 10 Aug 2012 15:34:36 -0400 Subject: * lisp/emacs-lisp/cl-macs.el (cl-loop): Improve debug spec. --- lisp/emacs-lisp/cl-macs.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/cl-macs.el') diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 95aa1f18a0c..9a59aa0c6db 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -731,7 +731,21 @@ Valid clauses are: finally return EXPR, named NAME. \(fn CLAUSE...)" - (declare (debug (&rest &or symbolp form))) + (declare (debug (&rest &or + ;; These are usually followed by a symbol, but it can + ;; actually be any destructuring-bind pattern, which + ;; would erroneously match `form'. + [[&or "for" "as" "with" "and"] sexp] + ;; These are followed by expressions which could + ;; erroneously match `symbolp'. + [[&or "from" "upfrom" "downfrom" "to" "upto" "downto" + "above" "below" "by" "in" "on" "=" "across" + "repeat" "while" "until" "always" "never" + "thereis" "collect" "append" "nconc" "sum" + "count" "maximize" "minimize" "if" "unless" + "return"] form] + ;; Simple default, which covers 99% of the cases. + symbolp form))) (if (not (memq t (mapcar 'symbolp (delq nil (delq t (cl-copy-list loop-args)))))) `(cl-block nil (while t ,@loop-args)) (let ((cl--loop-args loop-args) (cl--loop-name nil) (cl--loop-bindings nil) -- cgit v1.2.3