| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
(provide 'cl-specs) |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
(require 'edebug) |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
(def-edebug-spec block (symbolp body)) |
|---|
| 47 |
(def-edebug-spec return (&optional form)) |
|---|
| 48 |
(def-edebug-spec return-from (symbolp &optional form)) |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
(def-edebug-spec case (form &rest (sexp body))) |
|---|
| 53 |
(def-edebug-spec ecase case) |
|---|
| 54 |
(def-edebug-spec do |
|---|
| 55 |
((&rest &or symbolp (symbolp &optional form form)) |
|---|
| 56 |
(form body) |
|---|
| 57 |
cl-declarations body)) |
|---|
| 58 |
(def-edebug-spec do* do) |
|---|
| 59 |
(def-edebug-spec dolist |
|---|
| 60 |
((symbolp form &optional form) cl-declarations body)) |
|---|
| 61 |
(def-edebug-spec dotimes dolist) |
|---|
| 62 |
(def-edebug-spec do-symbols |
|---|
| 63 |
((symbolp &optional form form) cl-declarations body)) |
|---|
| 64 |
(def-edebug-spec do-all-symbols |
|---|
| 65 |
((symbolp &optional form) cl-declarations body)) |
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
(def-edebug-spec multiple-value-list (form)) |
|---|
| 70 |
(def-edebug-spec multiple-value-call (function-form body)) |
|---|
| 71 |
(def-edebug-spec multiple-value-bind |
|---|
| 72 |
((&rest symbolp) form cl-declarations body)) |
|---|
| 73 |
(def-edebug-spec multiple-value-setq ((&rest symbolp) form)) |
|---|
| 74 |
(def-edebug-spec multiple-value-prog1 (form body)) |
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
(def-edebug-spec lexical-let let) |
|---|
| 79 |
(def-edebug-spec lexical-let* let) |
|---|
| 80 |
|
|---|
| 81 |
(def-edebug-spec psetq setq) |
|---|
| 82 |
(def-edebug-spec progv (form form body)) |
|---|
| 83 |
|
|---|
| 84 |
(def-edebug-spec flet ((&rest (defun*)) cl-declarations body)) |
|---|
| 85 |
(def-edebug-spec labels flet) |
|---|
| 86 |
|
|---|
| 87 |
(def-edebug-spec macrolet |
|---|
| 88 |
((&rest (&define name (&rest arg) cl-declarations-or-string def-body)) |
|---|
| 89 |
cl-declarations body)) |
|---|
| 90 |
|
|---|
| 91 |
(def-edebug-spec symbol-macrolet |
|---|
| 92 |
((&rest (symbol sexp)) cl-declarations body)) |
|---|
| 93 |
|
|---|
| 94 |
(def-edebug-spec destructuring-bind |
|---|
| 95 |
(&define cl-macro-list form cl-declarations def-body)) |
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 |
(def-edebug-spec setf (&rest [place form])) |
|---|
| 100 |
(def-edebug-spec psetf setf) |
|---|
| 101 |
|
|---|
| 102 |
(def-edebug-spec letf |
|---|
| 103 |
((&rest (gate place &optional form)) |
|---|
| 104 |
body)) |
|---|
| 105 |
(def-edebug-spec letf* letf) |
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 |
(def-edebug-spec defsetf |
|---|
| 109 |
(&define name |
|---|
| 110 |
[&or [symbolp &optional stringp] |
|---|
| 111 |
[cl-lambda-list (symbolp)]] |
|---|
| 112 |
cl-declarations-or-string def-body)) |
|---|
| 113 |
|
|---|
| 114 |
(def-edebug-spec define-setf-method |
|---|
| 115 |
(&define name cl-lambda-list cl-declarations-or-string def-body)) |
|---|
| 116 |
|
|---|
| 117 |
(def-edebug-spec define-modify-macro |
|---|
| 118 |
(&define name cl-lambda-list |
|---|
| 119 |
symbolp &optional stringp)) |
|---|
| 120 |
|
|---|
| 121 |
(def-edebug-spec callf (function* place &rest form)) |
|---|
| 122 |
(def-edebug-spec callf2 (function* form place &rest form)) |
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 |
(def-edebug-spec remf (place form)) |
|---|
| 127 |
|
|---|
| 128 |
(def-edebug-spec incf (place &optional form)) |
|---|
| 129 |
(def-edebug-spec decf incf) |
|---|
| 130 |
(def-edebug-spec push (form place)) |
|---|
| 131 |
(def-edebug-spec pushnew |
|---|
| 132 |
(form place &rest |
|---|
| 133 |
&or [[&or ":test" ":test-not" ":key"] function-form] |
|---|
| 134 |
[keywordp form])) |
|---|
| 135 |
(def-edebug-spec pop (place)) |
|---|
| 136 |
|
|---|
| 137 |
(def-edebug-spec shiftf (&rest place)) |
|---|
| 138 |
(def-edebug-spec rotatef (&rest place)) |
|---|
| 139 |
|
|---|
| 140 |
|
|---|
| 141 |
|
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 |
(def-edebug-spec some (function-form form &rest form)) |
|---|
| 145 |
(def-edebug-spec every some) |
|---|
| 146 |
(def-edebug-spec notany some) |
|---|
| 147 |
(def-edebug-spec notevery some) |
|---|
| 148 |
|
|---|
| 149 |
|
|---|
| 150 |
|
|---|
| 151 |
(def-edebug-spec map (form function-form form &rest form)) |
|---|
| 152 |
(def-edebug-spec maplist (function-form form &rest form)) |
|---|
| 153 |
(def-edebug-spec mapc maplist) |
|---|
| 154 |
(def-edebug-spec mapl maplist) |
|---|
| 155 |
(def-edebug-spec mapcan maplist) |
|---|
| 156 |
(def-edebug-spec mapcon maplist) |
|---|
| 157 |
|
|---|
| 158 |
|
|---|
| 159 |
|
|---|
| 160 |
(def-edebug-spec reduce (function-form form &rest form)) |
|---|
| 161 |
|
|---|
| 162 |
|
|---|
| 163 |
|
|---|
| 164 |
(def-edebug-spec cl-type-spec (sexp)) |
|---|
| 165 |
|
|---|
| 166 |
(def-edebug-spec deftype defmacro*) |
|---|
| 167 |
(def-edebug-spec check-type (place cl-type-spec &optional stringp)) |
|---|
| 168 |
|
|---|
| 169 |
(def-edebug-spec assert (form &rest form)) |
|---|
| 170 |
(def-edebug-spec typecase (form &rest ([&or cl-type-spec "otherwise"] body))) |
|---|
| 171 |
(def-edebug-spec etypecase typecase) |
|---|
| 172 |
|
|---|
| 173 |
(def-edebug-spec ignore-errors t) |
|---|
| 174 |
|
|---|
| 175 |
|
|---|
| 176 |
|
|---|
| 177 |
(def-edebug-spec eval-when |
|---|
| 178 |
((&rest &or "compile" "load" "eval") body)) |
|---|
| 179 |
(def-edebug-spec load-time-value (form &optional &or "t" "nil")) |
|---|
| 180 |
|
|---|
| 181 |
|
|---|
| 182 |
|
|---|
| 183 |
(def-edebug-spec cl-decl-spec |
|---|
| 184 |
((symbolp &rest sexp))) |
|---|
| 185 |
|
|---|
| 186 |
(def-edebug-spec cl-declarations |
|---|
| 187 |
(&rest ("declare" &rest cl-decl-spec))) |
|---|
| 188 |
|
|---|
| 189 |
(def-edebug-spec cl-declarations-or-string |
|---|
| 190 |
(&or stringp cl-declarations)) |
|---|
| 191 |
|
|---|
| 192 |
(def-edebug-spec declaim (&rest cl-decl-spec)) |
|---|
| 193 |
(def-edebug-spec declare (&rest cl-decl-spec)) |
|---|
| 194 |
(def-edebug-spec locally (cl-declarations &rest form)) |
|---|
| 195 |
(def-edebug-spec the (cl-type-spec form)) |
|---|
| 196 |
|
|---|
| 197 |
|
|---|
| 198 |
|
|---|
| 199 |
|
|---|
| 200 |
(def-edebug-spec cl-lambda-list |
|---|
| 201 |
(([&rest arg] |
|---|
| 202 |
[&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] |
|---|
| 203 |
[&optional ["&rest" arg]] |
|---|
| 204 |
[&optional ["&key" [cl-&key-arg &rest cl-&key-arg] |
|---|
| 205 |
&optional "&allow-other-keys"]] |
|---|
| 206 |
[&optional ["&aux" &rest |
|---|
| 207 |
&or (symbolp &optional def-form) symbolp]] |
|---|
| 208 |
))) |
|---|
| 209 |
|
|---|
| 210 |
(def-edebug-spec cl-&optional-arg |
|---|
| 211 |
(&or (arg &optional def-form arg) arg)) |
|---|
| 212 |
|
|---|
| 213 |
(def-edebug-spec cl-&key-arg |
|---|
| 214 |
(&or ([&or (symbolp arg) arg] &optional def-form arg) arg)) |
|---|
| 215 |
|
|---|
| 216 |
|
|---|
| 217 |
|
|---|
| 218 |
|
|---|
| 219 |
|
|---|
| 220 |
(def-edebug-spec cl-macro-list |
|---|
| 221 |
(([&optional "&environment" arg] |
|---|
| 222 |
[&rest cl-macro-arg] |
|---|
| 223 |
[&optional ["&optional" &rest |
|---|
| 224 |
&or (cl-macro-arg &optional def-form cl-macro-arg) arg]] |
|---|
| 225 |
[&optional [[&or "&rest" "&body"] cl-macro-arg]] |
|---|
| 226 |
[&optional ["&key" [&rest |
|---|
| 227 |
[&or ([&or (symbolp cl-macro-arg) arg] |
|---|
| 228 |
&optional def-form cl-macro-arg) |
|---|
| 229 |
arg]] |
|---|
| 230 |
&optional "&allow-other-keys"]] |
|---|
| 231 |
[&optional ["&aux" &rest |
|---|
| 232 |
&or (symbolp &optional def-form) symbolp]] |
|---|
| 233 |
[&optional "&environment" arg] |
|---|
| 234 |
))) |
|---|
| 235 |
|
|---|
| 236 |
(def-edebug-spec cl-macro-arg |
|---|
| 237 |
(&or arg cl-macro-list1)) |
|---|
| 238 |
|
|---|
| 239 |
(def-edebug-spec cl-macro-list1 |
|---|
| 240 |
(([&optional "&whole" arg] |
|---|
| 241 |
[&rest cl-macro-arg] |
|---|
| 242 |
[&optional ["&optional" &rest |
|---|
| 243 |
&or (cl-macro-arg &optional def-form cl-macro-arg) arg]] |
|---|
| 244 |
[&optional [[&or "&rest" "&body"] cl-macro-arg]] |
|---|
| 245 |
[&optional ["&key" [&rest |
|---|
| 246 |
[&or ([&or (symbolp cl-macro-arg) arg] |
|---|
| 247 |
&optional def-form cl-macro-arg) |
|---|
| 248 |
arg]] |
|---|
| 249 |
&optional "&allow-other-keys"]] |
|---|
| 250 |
[&optional ["&aux" &rest |
|---|
| 251 |
&or (symbolp &optional def-form) symbolp]] |
|---|
| 252 |
. [&or arg nil]))) |
|---|
| 253 |
|
|---|
| 254 |
|
|---|
| 255 |
(def-edebug-spec defun* |
|---|
| 256 |
|
|---|
| 257 |
(&define [&or name |
|---|
| 258 |
("setf" :name setf name)] |
|---|
| 259 |
cl-lambda-list |
|---|
| 260 |
cl-declarations-or-string |
|---|
| 261 |
[&optional ("interactive" interactive)] |
|---|
| 262 |
def-body)) |
|---|
| 263 |
(def-edebug-spec defsubst* defun*) |
|---|
| 264 |
|
|---|
| 265 |
(def-edebug-spec defmacro* |
|---|
| 266 |
(&define name cl-macro-list cl-declarations-or-string def-body)) |
|---|
| 267 |
(def-edebug-spec define-compiler-macro defmacro*) |
|---|
| 268 |
|
|---|
| 269 |
|
|---|
| 270 |
(def-edebug-spec function* |
|---|
| 271 |
(&or symbolp cl-lambda-expr)) |
|---|
| 272 |
|
|---|
| 273 |
(def-edebug-spec cl-lambda-expr |
|---|
| 274 |
(&define ("lambda" cl-lambda-list |
|---|
| 275 |
|
|---|
| 276 |
|
|---|
| 277 |
def-body))) |
|---|
| 278 |
|
|---|
| 279 |
|
|---|
| 280 |
(def-edebug-spec function-form |
|---|
| 281 |
|
|---|
| 282 |
|
|---|
| 283 |
(&or ([&or "quote" "function"] &or symbolp lambda-expr) |
|---|
| 284 |
("function*" function*) |
|---|
| 285 |
form)) |
|---|
| 286 |
|
|---|
| 287 |
|
|---|
| 288 |
|
|---|
| 289 |
|
|---|
| 290 |
|
|---|
| 291 |
|
|---|
| 292 |
(def-edebug-spec defstruct |
|---|
| 293 |
(&define |
|---|
| 294 |
[&or symbolp |
|---|
| 295 |
(gate |
|---|
| 296 |
symbolp &rest |
|---|
| 297 |
(&or [":conc-name" &or stringp "nil"] |
|---|
| 298 |
[":constructor" symbolp &optional cl-lambda-list] |
|---|
| 299 |
[":copier" symbolp] |
|---|
| 300 |
[":predicate" symbolp] |
|---|
| 301 |
[":include" symbolp &rest sexp] |
|---|
| 302 |
|
|---|
| 303 |
|
|---|
| 304 |
|
|---|
| 305 |
|
|---|
| 306 |
))] |
|---|
| 307 |
[&optional stringp] |
|---|
| 308 |
|
|---|
| 309 |
&rest &or symbolp (symbolp def-form &optional ":read-only" sexp))) |
|---|
| 310 |
|
|---|
| 311 |
|
|---|
| 312 |
|
|---|
| 313 |
|
|---|
| 314 |
|
|---|
| 315 |
|
|---|
| 316 |
|
|---|
| 317 |
|
|---|
| 318 |
|
|---|
| 319 |
|
|---|
| 320 |
(def-edebug-spec loop |
|---|
| 321 |
(&rest &or symbolp form)) |
|---|
| 322 |
|
|---|
| 323 |
|
|---|
| 324 |
|
|---|
| 325 |
|
|---|
| 326 |
|
|---|
| 327 |
|
|---|
| 328 |
|
|---|
| 329 |
|
|---|
| 330 |
(def-edebug-spec loop |
|---|
| 331 |
([&optional ["named" symbolp]] |
|---|
| 332 |
[&rest |
|---|
| 333 |
&or |
|---|
| 334 |
["repeat" form] |
|---|
| 335 |
loop-for-as |
|---|
| 336 |
loop-with |
|---|
| 337 |
loop-initial-final] |
|---|
| 338 |
[&rest loop-clause] |
|---|
| 339 |
)) |
|---|
| 340 |
|
|---|
| 341 |
(def-edebug-spec loop-with |
|---|
| 342 |
("with" loop-var |
|---|
| 343 |
loop-type-spec |
|---|
| 344 |
[&optional ["=" form]] |
|---|
| 345 |
&rest ["and" loop-var |
|---|
| 346 |
loop-type-spec |
|---|
| 347 |
[&optional ["=" form]]])) |
|---|
| 348 |
|
|---|
| 349 |
(def-edebug-spec loop-for-as |
|---|
| 350 |
([&or "for" "as"] loop-for-as-subclause |
|---|
| 351 |
&rest ["and" loop-for-as-subclause])) |
|---|
| 352 |
|
|---|
| 353 |
(def-edebug-spec loop-for-as-subclause |
|---|
| 354 |
(loop-var |
|---|
| 355 |
loop-type-spec |
|---|
| 356 |
&or |
|---|
| 357 |
[[&or "in" "on" "in-ref" "across-ref"] |
|---|
| 358 |
form &optional ["by" function-form]] |
|---|
| 359 |
|
|---|
| 360 |
["=" form &optional ["then" form]] |
|---|
| 361 |
["across" form] |
|---|
| 362 |
["being" |
|---|
| 363 |
[&or "the" "each"] |
|---|
| 364 |
&or |
|---|
| 365 |
[[&or "element" "elements"] |
|---|
| 366 |
[&or "of" "in" "of-ref"] form |
|---|
| 367 |
&optional "using" ["index" symbolp]] |
|---|
| 368 |
[[&or "hash-key" "hash-keys" |
|---|
| 369 |
"hash-value" "hash-values"] |
|---|
| 370 |
[&or "of" "in"] |
|---|
| 371 |
hash-table-p &optional ["using" ([&or "hash-value" "hash-values" |
|---|
| 372 |
"hash-key" "hash-keys"] sexp)]] |
|---|
| 373 |
|
|---|
| 374 |
[[&or "symbol" "present-symbol" "external-symbol" |
|---|
| 375 |
"symbols" "present-symbols" "external-symbols"] |
|---|
| 376 |
[&or "in" "of"] package-p] |
|---|
| 377 |
|
|---|
| 378 |
|
|---|
| 379 |
[[&or "frame" "frames" |
|---|
| 380 |
"screen" "screens" |
|---|
| 381 |
"buffer" "buffers"]] |
|---|
| 382 |
|
|---|
| 383 |
[[&or "window" "windows"] |
|---|
| 384 |
[&or "of" "in"] form] |
|---|
| 385 |
|
|---|
| 386 |
[[&or "overlay" "overlays" |
|---|
| 387 |
"extent" "extents"] |
|---|
| 388 |
[&or "of" "in"] form |
|---|
| 389 |
&optional [[&or "from" "to"] form]] |
|---|
| 390 |
|
|---|
| 391 |
[[&or "interval" "intervals"] |
|---|
| 392 |
[&or "in" "of"] form |
|---|
| 393 |
&optional [[&or "from" "to"] form] |
|---|
| 394 |
["property" form]] |
|---|
| 395 |
|
|---|
| 396 |
[[&or "key-code" "key-codes" |
|---|
| 397 |
"key-seq" "key-seqs" |
|---|
| 398 |
"key-binding" "key-bindings"] |
|---|
| 399 |
[&or "in" "of"] form |
|---|
| 400 |
&optional ["using" ([&or "key-code" "key-codes" |
|---|
| 401 |
"key-seq" "key-seqs" |
|---|
| 402 |
"key-binding" "key-bindings"] |
|---|
| 403 |
sexp)]] |
|---|
| 404 |
|
|---|
| 405 |
[symbolp &rest &or symbolp form] |
|---|
| 406 |
] |
|---|
| 407 |
|
|---|
| 408 |
|
|---|
| 409 |
[[&optional [[&or "from" "downfrom" "upfrom"] form]] |
|---|
| 410 |
[&optional [[&or "to" "downto" "upto" "below" "above"] form]] |
|---|
| 411 |
[&optional ["by" form]] |
|---|
| 412 |
])) |
|---|
| 413 |
|
|---|
| 414 |
(def-edebug-spec loop-initial-final |
|---|
| 415 |
(&or ["initially" |
|---|
| 416 |
|
|---|
| 417 |
&rest loop-non-atomic-expr] |
|---|
| 418 |
["finally" &or |
|---|
| 419 |
[[&optional &or "do" "doing"] &rest loop-non-atomic-expr] |
|---|
| 420 |
["return" form]])) |
|---|
| 421 |
|
|---|
| 422 |
(def-edebug-spec loop-and-clause |
|---|
| 423 |
(loop-clause &rest ["and" loop-clause])) |
|---|
| 424 |
|
|---|
| 425 |
(def-edebug-spec loop-clause |
|---|
| 426 |
(&or |
|---|
| 427 |
[[&or "while" "until" "always" "never" "thereis"] form] |
|---|
| 428 |
|
|---|
| 429 |
[[&or "collect" "collecting" |
|---|
| 430 |
"append" "appending" |
|---|
| 431 |
"nconc" "nconcing" |
|---|
| 432 |
"concat" "vconcat"] form |
|---|
| 433 |
[&optional ["into" loop-var]]] |
|---|
| 434 |
|
|---|
| 435 |
[[&or "count" "counting" |
|---|
| 436 |
"sum" "summing" |
|---|
| 437 |
"maximize" "maximizing" |
|---|
| 438 |
"minimize" "minimizing"] form |
|---|
| 439 |
[&optional ["into" loop-var]] |
|---|
| 440 |
loop-type-spec] |
|---|
| 441 |
|
|---|
| 442 |
[[&or "if" "when" "unless"] |
|---|
| 443 |
form loop-and-clause |
|---|
| 444 |
[&optional ["else" loop-and-clause]] |
|---|
| 445 |
[&optional "end"]] |
|---|
| 446 |
|
|---|
| 447 |
[[&or "do" "doing"] &rest loop-non-atomic-expr] |
|---|
| 448 |
|
|---|
| 449 |
["return" form] |
|---|
| 450 |
loop-initial-final |
|---|
| 451 |
)) |
|---|
| 452 |
|
|---|
| 453 |
(def-edebug-spec loop-non-atomic-expr |
|---|
| 454 |
([¬ atom] form)) |
|---|
| 455 |
|
|---|
| 456 |
(def-edebug-spec loop-var |
|---|
| 457 |
|
|---|
| 458 |
|
|---|
| 459 |
|
|---|
| 460 |
|
|---|
| 461 |
|
|---|
| 462 |
|
|---|
| 463 |
|
|---|
| 464 |
|
|---|
| 465 |
(&or (loop-var . [&or nil loop-var]) [gate symbolp])) |
|---|
| 466 |
|
|---|
| 467 |
(def-edebug-spec loop-type-spec |
|---|
| 468 |
(&optional ["of-type" loop-d-type-spec])) |
|---|
| 469 |
|
|---|
| 470 |
(def-edebug-spec loop-d-type-spec |
|---|
| 471 |
(&or (loop-d-type-spec . [&or nil loop-d-type-spec]) cl-type-spec)) |
|---|
| 472 |
|
|---|
| 473 |
|
|---|
| 474 |
|
|---|
| 475 |
|
|---|