annotate lisp/emacs-lisp/cl-specs.el @ 23788:764497f1c6a0

(flyspell-check-word-p): Don't delay inside a kbd macro.
author Richard M. Stallman <rms@gnu.org>
date Tue, 01 Dec 1998 00:50:45 +0000
parents 0a3fa36b323b
children a71509a64082
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13337
84acc3adcd63 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 11489
diff changeset
1 ;;; cl-specs.el --- Edebug specs for cl.el
6491
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
2
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
3 ;; Copyright (C) 1993 Free Software Foundation, Inc.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
4 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
5 ;; Keywords: lisp, tools, maint
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
6
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
7 ;; LCD Archive Entry:
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
8 ;; cl-specs.el|Daniel LaLiberte|liberte@cs.uiuc.edu
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
9 ;; |Edebug specs for cl.el
23513
0a3fa36b323b (function-form): Fix spec for
Andreas Schwab <schwab@suse.de>
parents: 14169
diff changeset
10 ;; |$Date: 1996/01/14 07:34:30 $|1.1|
6491
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
11
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
12 ;; This file is part of GNU Emacs.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
13
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
14 ;; GNU Emacs is free software; you can redistribute it and/or modify
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
15 ;; it under the terms of the GNU General Public License as published by
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
16 ;; the Free Software Foundation; either version 2, or (at your option)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
17 ;; any later version.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
18
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
19 ;; GNU Emacs is distributed in the hope that it will be useful,
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
22 ;; GNU General Public License for more details.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
23
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
24 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14040
diff changeset
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14040
diff changeset
26 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14040
diff changeset
27 ;; Boston, MA 02111-1307, USA.
6491
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
28
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
29 ;;;; Commentary:
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
30
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
31 ;; These specs are to be used with edebug.el version 3.3 or later and
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
32 ;; cl.el version 2.03 or later, by Dave Gillespie <daveg@synaptics.com>.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
33
14040
187735b53d52 Comment fixes.
Karl Heuer <kwzh@gnu.org>
parents: 13337
diff changeset
34 ;; This file need not be byte-compiled, but it shouldn't hurt.
6491
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
35
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
36 (provide 'cl-specs)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
37 ;; Do the above provide before the following require.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
38 ;; Otherwise if you load this before edebug if cl is already loaded
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
39 ;; an infinite loading loop would occur.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
40 (require 'edebug)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
41
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
42 ;; Blocks
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
43
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
44 (def-edebug-spec block (symbolp body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
45 (def-edebug-spec return (&optional form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
46 (def-edebug-spec return-from (symbolp &optional form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
47
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
48 ;; Loops
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
49
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
50 (def-edebug-spec when t)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
51 (def-edebug-spec unless t)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
52 (def-edebug-spec case (form &rest (sexp body)))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
53 (def-edebug-spec ecase case)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
54 (def-edebug-spec do
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
55 ((&rest &or symbolp (symbolp &optional form form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
56 (form body)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
57 cl-declarations body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
58 (def-edebug-spec do* do)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
59 (def-edebug-spec dolist
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
60 ((symbolp form &optional form) cl-declarations body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
61 (def-edebug-spec dotimes dolist)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
62 (def-edebug-spec do-symbols
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
63 ((symbolp &optional form form) cl-declarations body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
64 (def-edebug-spec do-all-symbols
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
65 ((symbolp &optional form) cl-declarations body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
66
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
67 ;; Multiple values
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
68
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
69 (def-edebug-spec multiple-value-list (form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
70 (def-edebug-spec multiple-value-call (function-form body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
71 (def-edebug-spec multiple-value-bind
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
72 ((&rest symbolp) form cl-declarations body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
73 (def-edebug-spec multiple-value-setq ((&rest symbolp) form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
74 (def-edebug-spec multiple-value-prog1 (form body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
75
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
76 ;; Bindings
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
77
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
78 (def-edebug-spec lexical-let let)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
79 (def-edebug-spec lexical-let* let)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
80
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
81 (def-edebug-spec psetq setq)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
82 (def-edebug-spec progv (form form body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
83
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
84 (def-edebug-spec flet ((&rest (defun*)) cl-declarations body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
85 (def-edebug-spec labels flet)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
86
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
87 (def-edebug-spec macrolet
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
88 ((&rest (&define name (&rest arg) cl-declarations-or-string def-body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
89 cl-declarations body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
90
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
91 (def-edebug-spec symbol-macrolet
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
92 ((&rest (symbol sexp)) cl-declarations body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
93
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
94 (def-edebug-spec destructuring-bind
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
95 (&define cl-macro-list form cl-declarations def-body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
96
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
97 ;; Setf
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
98
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
99 (def-edebug-spec setf (&rest [place form])) ;; sexp is not specific enough
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
100 (def-edebug-spec psetf setf)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
101
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
102 (def-edebug-spec letf ;; *not* available in Common Lisp
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
103 ((&rest (gate place &optional form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
104 body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
105 (def-edebug-spec letf* letf)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
106
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
107
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
108 (def-edebug-spec defsetf
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
109 (&define name
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
110 [&or [symbolp &optional stringp]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
111 [cl-lambda-list (symbolp)]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
112 cl-declarations-or-string def-body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
113
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
114 (def-edebug-spec define-setf-method
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
115 (&define name cl-lambda-list cl-declarations-or-string def-body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
116
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
117 (def-edebug-spec define-modify-macro
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
118 (&define name cl-lambda-list ;; should exclude &key
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
119 symbolp &optional stringp))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
120
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
121 (def-edebug-spec callf (function* place &rest form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
122 (def-edebug-spec callf2 (function* form place &rest form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
123
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
124 ;; Other operations on places
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
125
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
126 (def-edebug-spec remf (place form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
127
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
128 (def-edebug-spec incf (place &optional form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
129 (def-edebug-spec decf incf)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
130 (def-edebug-spec push (form place))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
131 (def-edebug-spec pushnew
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
132 (form place &rest
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
133 &or [[&or ":test" ":test-not" ":key"] function-form]
11489
cfb899623032 (pushnew): Use edebug-keywordp.
Richard M. Stallman <rms@gnu.org>
parents: 6686
diff changeset
134 [edebug-keywordp form]))
6491
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
135 (def-edebug-spec pop (place))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
136
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
137 (def-edebug-spec shiftf (&rest place)) ;; really [&rest place] form
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
138 (def-edebug-spec rotatef (&rest place))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
139
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
140
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
141 ;; Functions with function args. These are only useful if the
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
142 ;; function arg is quoted with ' instead of function.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
143
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
144 (def-edebug-spec some (function-form form &rest form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
145 (def-edebug-spec every some)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
146 (def-edebug-spec notany some)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
147 (def-edebug-spec notevery some)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
148
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
149 ;; Mapping
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
150
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
151 (def-edebug-spec map (form function-form form &rest form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
152 (def-edebug-spec maplist (function-form form &rest form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
153 (def-edebug-spec mapc maplist)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
154 (def-edebug-spec mapl maplist)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
155 (def-edebug-spec mapcan maplist)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
156 (def-edebug-spec mapcon maplist)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
157
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
158 ;; Sequences
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
159
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
160 (def-edebug-spec reduce (function-form form &rest form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
161
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
162 ;; Types and assertions
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
163
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
164 (def-edebug-spec cl-type-spec (sexp)) ;; not worth the trouble to specify, yet.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
165
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
166 (def-edebug-spec deftype defmacro*)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
167 (def-edebug-spec check-type (place cl-type-spec &optional stringp))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
168 ;; (def-edebug-spec assert (form &optional form stringp &rest form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
169 (def-edebug-spec assert (form &rest form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
170 (def-edebug-spec typecase (form &rest ([&or cl-type-spec "otherwise"] body)))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
171 (def-edebug-spec etypecase typecase)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
172
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
173 (def-edebug-spec ignore-errors t)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
174
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
175 ;; Time of Evaluation
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
176
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
177 (def-edebug-spec eval-when
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
178 ((&rest &or "compile" "load" "eval") body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
179 (def-edebug-spec load-time-value (form &optional &or "t" "nil"))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
180
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
181 ;; Declarations
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
182
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
183 (def-edebug-spec cl-decl-spec
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
184 ((symbolp &rest sexp)))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
185
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
186 (def-edebug-spec cl-declarations
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
187 (&rest ("declare" &rest cl-decl-spec)))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
188
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
189 (def-edebug-spec cl-declarations-or-string
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
190 (&or stringp cl-declarations))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
191
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
192 (def-edebug-spec declaim (&rest cl-decl-spec))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
193 (def-edebug-spec declare (&rest cl-decl-spec)) ;; probably not needed.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
194 (def-edebug-spec locally (cl-declarations &rest form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
195 (def-edebug-spec the (cl-type-spec form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
196
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
197 ;;======================================================
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
198 ;; Lambda things
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
199
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
200 (def-edebug-spec cl-lambda-list
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
201 (([&rest arg]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
202 [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
203 [&optional ["&rest" arg]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
204 [&optional ["&key" [cl-&key-arg &rest cl-&key-arg]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
205 &optional "&allow-other-keywords"]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
206 [&optional ["&aux" &rest
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
207 &or (symbolp &optional def-form) symbolp]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
208 )))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
209
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
210 (def-edebug-spec cl-&optional-arg
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
211 (&or (arg &optional def-form arg) arg))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
212
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
213 (def-edebug-spec cl-&key-arg
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
214 (&or ([&or (symbolp arg) arg] &optional def-form arg) arg))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
215
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
216 ;; The lambda list for macros is different from that of normal lambdas.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
217 ;; Note that &environment is only allowed as first or last items in the
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
218 ;; top level list.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
219
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
220 (def-edebug-spec cl-macro-list
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
221 (([&optional "&environment" arg]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
222 [&rest cl-macro-arg]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
223 [&optional ["&optional" &rest
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
224 &or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
225 [&optional [[&or "&rest" "&body"] cl-macro-arg]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
226 [&optional ["&key" [&rest
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
227 [&or ([&or (symbolp cl-macro-arg) arg]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
228 &optional def-form cl-macro-arg)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
229 arg]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
230 &optional "&allow-other-keywords"]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
231 [&optional ["&aux" &rest
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
232 &or (symbolp &optional def-form) symbolp]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
233 [&optional "&environment" arg]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
234 )))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
235
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
236 (def-edebug-spec cl-macro-arg
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
237 (&or arg cl-macro-list1))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
238
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
239 (def-edebug-spec cl-macro-list1
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
240 (([&optional "&whole" arg] ;; only allowed at lower levels
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
241 [&rest cl-macro-arg]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
242 [&optional ["&optional" &rest
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
243 &or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
244 [&optional [[&or "&rest" "&body"] cl-macro-arg]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
245 [&optional ["&key" [&rest
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
246 [&or ([&or (symbolp cl-macro-arg) arg]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
247 &optional def-form cl-macro-arg)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
248 arg]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
249 &optional "&allow-other-keywords"]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
250 [&optional ["&aux" &rest
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
251 &or (symbolp &optional def-form) symbolp]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
252 . [&or arg nil])))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
253
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
254
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
255 (def-edebug-spec defun*
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
256 ;; Same as defun but use cl-lambda-list.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
257 (&define [&or name
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
258 ("setf" :name setf name)]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
259 cl-lambda-list
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
260 cl-declarations-or-string
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
261 [&optional ("interactive" interactive)]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
262 def-body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
263 (def-edebug-spec defsubst* defun*)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
264
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
265 (def-edebug-spec defmacro*
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
266 (&define name cl-macro-list cl-declarations-or-string def-body))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
267 (def-edebug-spec define-compiler-macro defmacro*)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
268
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
269
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
270 (def-edebug-spec function*
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
271 (&or symbolp cl-lambda-expr))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
272
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
273 (def-edebug-spec cl-lambda-expr
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
274 (&define ("lambda" cl-lambda-list
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
275 ;;cl-declarations-or-string
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
276 ;;[&optional ("interactive" interactive)]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
277 def-body)))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
278
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
279 ;; Redefine function-form to also match function*
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
280 (def-edebug-spec function-form
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
281 ;; form at the end could also handle "function",
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
282 ;; but recognize it specially to avoid wrapping function forms.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
283 (&or ([&or "quote" "function"] &or symbolp lambda-expr)
23513
0a3fa36b323b (function-form): Fix spec for
Andreas Schwab <schwab@suse.de>
parents: 14169
diff changeset
284 ("function*" function*)
6491
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
285 form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
286
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
287 ;;======================================================
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
288 ;; Structures
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
289 ;; (def-edebug-spec defstruct (&rest sexp)) would be sufficient, but...
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
290
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
291 ;; defstruct may contain forms that are evaluated when a structure is created.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
292 (def-edebug-spec defstruct
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
293 (&define ; makes top-level form not be wrapped
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
294 [&or symbolp
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
295 (gate
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
296 symbolp &rest
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
297 (&or [":conc-name" &or stringp "nil"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
298 [":constructor" symbolp &optional cl-lambda-list]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
299 [":copier" symbolp]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
300 [":predicate" symbolp]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
301 [":include" symbolp &rest sexp];; not finished
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
302 ;; The following are not supported.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
303 ;; [":print-function" ...]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
304 ;; [":type" ...]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
305 ;; [":initial-offset" ...]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
306 ))]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
307 [&optional stringp]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
308 ;; All the above is for the following def-form.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
309 &rest &or symbolp (symbolp def-form &optional ":read-only" sexp)))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
310
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
311 ;;======================================================
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
312 ;; Loop
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
313
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
314 ;; The loop macro is very complex, and a full spec is found below.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
315 ;; The following spec only minimally specifies that
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
316 ;; parenthesized forms are executable, but single variables used as
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
317 ;; expressions will be missed. You may want to use this if the full
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
318 ;; spec causes problems for you.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
319
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
320 (def-edebug-spec loop
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
321 (&rest &or symbolp form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
322
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
323 ;; Below is a complete spec for loop, in several parts that correspond
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
324 ;; to the syntax given in CLtL2. The specs do more than specify where
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
325 ;; the forms are; it also specifies, as much as Edebug allows, all the
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
326 ;; syntactically legal loop clauses. The disadvantage of this
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
327 ;; completeness is rigidity, but the "for ... being" clause allows
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
328 ;; arbitrary extensions of the form: [symbolp &rest &or symbolp form].
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
329
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
330 (def-edebug-spec loop
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
331 ([&optional ["named" symbolp]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
332 [&rest
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
333 &or
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
334 ["repeat" form]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
335 loop-for-as
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
336 loop-with
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
337 loop-initial-final]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
338 [&rest loop-clause]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
339 ))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
340
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
341 (def-edebug-spec loop-with
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
342 ("with" loop-var
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
343 loop-type-spec
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
344 [&optional ["=" form]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
345 &rest ["and" loop-var
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
346 loop-type-spec
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
347 [&optional ["=" form]]]))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
348
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
349 (def-edebug-spec loop-for-as
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
350 ([&or "for" "as"] loop-for-as-subclause
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
351 &rest ["and" loop-for-as-subclause]))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
352
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
353 (def-edebug-spec loop-for-as-subclause
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
354 (loop-var
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
355 loop-type-spec
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
356 &or
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
357 [[&or "in" "on" "in-ref" "across-ref"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
358 form &optional ["by" function-form]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
359
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
360 ["=" form &optional ["then" form]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
361 ["across" form]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
362 ["being"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
363 [&or "the" "each"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
364 &or
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
365 [[&or "element" "elements"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
366 [&or "of" "in" "of-ref"] form
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
367 &optional "using" ["index" symbolp]];; is this right?
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
368 [[&or "hash-key" "hash-keys"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
369 "hash-value" "hash-values"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
370 [&or "of" "in"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
371 hash-table-p &optional ["using" ([&or "hash-value" "hash-values"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
372 "hash-key" "hash-keys"] sexp)]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
373
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
374 [[&or "symbol" "present-symbol" "external-symbol"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
375 "symbols" "present-symbols" "external-symbols"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
376 [&or "in" "of"] package-p]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
377
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
378 ;; Extensions for Emacs Lisp, including Lucid Emacs.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
379 [[&or "frame" "frames"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
380 "screen" "screens"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
381 "buffer" "buffers"]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
382
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
383 [[&or "window" "windows"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
384 [&or "of" "in"] form]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
385
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
386 [[&or "overlay" "overlays"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
387 "extent" "extents"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
388 [&or "of" "in"] form
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
389 &optional [[&or "from" "to"] form]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
390
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
391 [[&or "interval" "intervals"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
392 [&or "in" "of"] form
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
393 &optional [[&or "from" "to"] form]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
394 ["property" form]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
395
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
396 [[&or "key-code" "key-codes"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
397 "key-seq" "key-seqs"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
398 "key-binding" "key-bindings"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
399 [&or "in" "of"] form
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
400 &optional ["using" ([&or "key-code" "key-codes"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
401 "key-seq" "key-seqs"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
402 "key-binding" "key-bindings"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
403 sexp)]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
404 ;; For arbitrary extensions, recognize anything else.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
405 [symbolp &rest &or symbolp form]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
406 ]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
407
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
408 ;; arithmetic - must be last since all parts are optional.
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
409 [[&optional [[&or "from" "downfrom" "upfrom"] form]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
410 [&optional [[&or "to" "downto" "upto" "below" "above"] form]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
411 [&optional ["by" form]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
412 ]))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
413
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
414 (def-edebug-spec loop-initial-final
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
415 (&or ["initially"
14040
187735b53d52 Comment fixes.
Karl Heuer <kwzh@gnu.org>
parents: 13337
diff changeset
416 ;; [&optional &or "do" "doing"] ;; CLtL2 doesn't allow this.
6491
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
417 &rest loop-non-atomic-expr]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
418 ["finally" &or
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
419 [[&optional &or "do" "doing"] &rest loop-non-atomic-expr]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
420 ["return" form]]))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
421
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
422 (def-edebug-spec loop-and-clause
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
423 (loop-clause &rest ["and" loop-clause]))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
424
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
425 (def-edebug-spec loop-clause
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
426 (&or
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
427 [[&or "while" "until" "always" "never" "thereis"] form]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
428
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
429 [[&or "collect" "collecting"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
430 "append" "appending"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
431 "nconc" "nconcing"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
432 "concat" "vconcat"] form
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
433 [&optional ["into" loop-var]]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
434
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
435 [[&or "count" "counting"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
436 "sum" "summing"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
437 "maximize" "maximizing"
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
438 "minimize" "minimizing"] form
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
439 [&optional ["into" loop-var]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
440 loop-type-spec]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
441
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
442 [[&or "if" "when" "unless"]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
443 form loop-and-clause
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
444 [&optional ["else" loop-and-clause]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
445 [&optional "end"]]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
446
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
447 [[&or "do" "doing"] &rest loop-non-atomic-expr]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
448
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
449 ["return" form]
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
450 loop-initial-final
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
451 ))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
452
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
453 (def-edebug-spec loop-non-atomic-expr
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
454 ([&not atom] form))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
455
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
456 (def-edebug-spec loop-var
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
457 ;; The symbolp must be last alternative to recognize e.g. (a b . c)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
458 ;; loop-var =>
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
459 ;; (loop-var . [&or nil loop-var])
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
460 ;; (symbolp . [&or nil loop-var])
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
461 ;; (symbolp . loop-var)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
462 ;; (symbolp . (symbolp . [&or nil loop-var]))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
463 ;; (symbolp . (symbolp . loop-var))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
464 ;; (symbolp . (symbolp . symbolp)) == (symbolp symbolp . symbolp)
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
465 (&or (loop-var . [&or nil loop-var]) [gate symbolp]))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
466
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
467 (def-edebug-spec loop-type-spec
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
468 (&optional ["of-type" loop-d-type-spec]))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
469
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
470 (def-edebug-spec loop-d-type-spec
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
471 (&or (loop-d-type-spec . [&or nil loop-d-type-spec]) cl-type-spec))
21d52b9fd783 Initial revision
Daniel LaLiberte <liberte@gnu.org>
parents:
diff changeset
472