annotate lisp/emacs-lisp/cl-specs.el @ 12701:c50826e44362

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