/[emacs]/emacs/lisp/emacs-lisp/cl-specs.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/cl-specs.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by pj, Mon Jul 16 12:22:59 2001 UTC revision 1.11.8.1 by miles, Fri Apr 4 06:20:16 2003 UTC
# Line 1  Line 1 
1  ;;; cl-specs.el --- Edebug specs for cl.el  ;;; cl-specs.el --- Edebug specs for cl.el -*- no-byte-compile: t -*-
2    
3  ;; Copyright (C) 1993 Free Software Foundation, Inc.  ;; Copyright (C) 1993 Free Software Foundation, Inc.
4  ;; Author: Daniel LaLiberte <liberte@holonexus.org>  ;; Author: Daniel LaLiberte <liberte@holonexus.org>
# Line 53  Line 53 
53  (def-edebug-spec ecase case)  (def-edebug-spec ecase case)
54  (def-edebug-spec do  (def-edebug-spec do
55    ((&rest &or symbolp (symbolp &optional form form))    ((&rest &or symbolp (symbolp &optional form form))
56     (form body)     (form body)
57     cl-declarations body))     cl-declarations body))
58  (def-edebug-spec do* do)  (def-edebug-spec do* do)
59  (def-edebug-spec dolist  (def-edebug-spec dolist
60    ((symbolp form &optional form) cl-declarations body))    ((symbolp form &optional form) cl-declarations body))
61  (def-edebug-spec dotimes dolist)  (def-edebug-spec dotimes dolist)
62  (def-edebug-spec do-symbols  (def-edebug-spec do-symbols
63    ((symbolp &optional form form) cl-declarations body))    ((symbolp &optional form form) cl-declarations body))
64  (def-edebug-spec do-all-symbols  (def-edebug-spec do-all-symbols
65    ((symbolp &optional form) cl-declarations body))    ((symbolp &optional form) cl-declarations body))
66    
67  ;; Multiple values  ;; Multiple values
68    
69  (def-edebug-spec multiple-value-list (form))  (def-edebug-spec multiple-value-list (form))
70  (def-edebug-spec multiple-value-call (function-form body))  (def-edebug-spec multiple-value-call (function-form body))
71  (def-edebug-spec multiple-value-bind  (def-edebug-spec multiple-value-bind
72    ((&rest symbolp) form cl-declarations body))    ((&rest symbolp) form cl-declarations body))
73  (def-edebug-spec multiple-value-setq ((&rest symbolp) form))  (def-edebug-spec multiple-value-setq ((&rest symbolp) form))
74  (def-edebug-spec multiple-value-prog1 (form body))  (def-edebug-spec multiple-value-prog1 (form body))
# Line 84  Line 84 
84  (def-edebug-spec flet ((&rest (defun*)) cl-declarations body))  (def-edebug-spec flet ((&rest (defun*)) cl-declarations body))
85  (def-edebug-spec labels flet)  (def-edebug-spec labels flet)
86    
87  (def-edebug-spec macrolet  (def-edebug-spec macrolet
88    ((&rest (&define name (&rest arg) cl-declarations-or-string def-body))    ((&rest (&define name (&rest arg) cl-declarations-or-string def-body))
89     cl-declarations body))     cl-declarations body))
90    
91  (def-edebug-spec symbol-macrolet  (def-edebug-spec symbol-macrolet
92    ((&rest (symbol sexp)) cl-declarations body))    ((&rest (symbol sexp)) cl-declarations body))
93    
94  (def-edebug-spec destructuring-bind  (def-edebug-spec destructuring-bind
# Line 105  Line 105 
105  (def-edebug-spec letf* letf)  (def-edebug-spec letf* letf)
106    
107    
108  (def-edebug-spec defsetf  (def-edebug-spec defsetf
109    (&define name    (&define name
110             [&or [symbolp &optional stringp]             [&or [symbolp &optional stringp]
111                  [cl-lambda-list (symbolp)]]                  [cl-lambda-list (symbolp)]]
112             cl-declarations-or-string def-body))             cl-declarations-or-string def-body))
113    
114  (def-edebug-spec define-setf-method  (def-edebug-spec define-setf-method
115    (&define name cl-lambda-list cl-declarations-or-string def-body))    (&define name cl-lambda-list cl-declarations-or-string def-body))
116    
117  (def-edebug-spec define-modify-macro  (def-edebug-spec define-modify-macro
# Line 128  Line 128 
128  (def-edebug-spec incf (place &optional form))  (def-edebug-spec incf (place &optional form))
129  (def-edebug-spec decf incf)  (def-edebug-spec decf incf)
130  (def-edebug-spec push (form place))     ; different for CL  (def-edebug-spec push (form place))     ; different for CL
131  (def-edebug-spec pushnew  (def-edebug-spec pushnew
132    (form place &rest    (form place &rest
133          &or [[&or ":test" ":test-not" ":key"] function-form]          &or [[&or ":test" ":test-not" ":key"] function-form]
134          [edebug-keywordp form]))          [edebug-keywordp form]))
135  (def-edebug-spec pop (place))           ; different for CL  (def-edebug-spec pop (place))           ; different for CL
# Line 180  Line 180 
180    
181  ;; Declarations  ;; Declarations
182    
183  (def-edebug-spec cl-decl-spec  (def-edebug-spec cl-decl-spec
184    ((symbolp &rest sexp)))    ((symbolp &rest sexp)))
185    
186  (def-edebug-spec cl-declarations  (def-edebug-spec cl-declarations
# Line 214  Line 214 
214    (&or ([&or (symbolp arg) arg] &optional def-form arg) arg))    (&or ([&or (symbolp arg) arg] &optional def-form arg) arg))
215    
216  ;; The lambda list for macros is different from that of normal lambdas.  ;; The lambda list for macros is different from that of normal lambdas.
217  ;; Note that &environment is only allowed as first or last items in the  ;; Note that &environment is only allowed as first or last items in the
218  ;; top level list.  ;; top level list.
219    
220  (def-edebug-spec cl-macro-list  (def-edebug-spec cl-macro-list
221    (([&optional "&environment" arg]    (([&optional "&environment" arg]
222      [&rest cl-macro-arg]      [&rest cl-macro-arg]
223      [&optional ["&optional" &rest      [&optional ["&optional" &rest
224                  &or (cl-macro-arg &optional def-form cl-macro-arg) arg]]                  &or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
225      [&optional [[&or "&rest" "&body"] cl-macro-arg]]      [&optional [[&or "&rest" "&body"] cl-macro-arg]]
226      [&optional ["&key" [&rest      [&optional ["&key" [&rest
227                          [&or ([&or (symbolp cl-macro-arg) arg]                          [&or ([&or (symbolp cl-macro-arg) arg]
228                                &optional def-form cl-macro-arg)                                &optional def-form cl-macro-arg)
229                               arg]]                               arg]]
230                  &optional "&allow-other-keys"]]                  &optional "&allow-other-keys"]]
# Line 239  Line 239 
239  (def-edebug-spec cl-macro-list1  (def-edebug-spec cl-macro-list1
240    (([&optional "&whole" arg]  ;; only allowed at lower levels    (([&optional "&whole" arg]  ;; only allowed at lower levels
241      [&rest cl-macro-arg]      [&rest cl-macro-arg]
242      [&optional ["&optional" &rest      [&optional ["&optional" &rest
243                  &or (cl-macro-arg &optional def-form cl-macro-arg) arg]]                  &or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
244      [&optional [[&or "&rest" "&body"] cl-macro-arg]]      [&optional [[&or "&rest" "&body"] cl-macro-arg]]
245      [&optional ["&key" [&rest      [&optional ["&key" [&rest
246                          [&or ([&or (symbolp cl-macro-arg) arg]                          [&or ([&or (symbolp cl-macro-arg) arg]
247                                &optional def-form cl-macro-arg)                                &optional def-form cl-macro-arg)
248                               arg]]                               arg]]
249                  &optional "&allow-other-keys"]]                  &optional "&allow-other-keys"]]
# Line 262  Line 262 
262             def-body))             def-body))
263  (def-edebug-spec defsubst* defun*)  (def-edebug-spec defsubst* defun*)
264    
265  (def-edebug-spec defmacro*  (def-edebug-spec defmacro*
266    (&define name cl-macro-list cl-declarations-or-string def-body))    (&define name cl-macro-list cl-declarations-or-string def-body))
267  (def-edebug-spec define-compiler-macro defmacro*)  (def-edebug-spec define-compiler-macro defmacro*)
268    
# Line 280  Line 280 
280  (def-edebug-spec function-form  (def-edebug-spec function-form
281    ;; form at the end could also handle "function",    ;; form at the end could also handle "function",
282    ;; but recognize it specially to avoid wrapping function forms.    ;; but recognize it specially to avoid wrapping function forms.
283    (&or ([&or "quote" "function"] &or symbolp lambda-expr)    (&or ([&or "quote" "function"] &or symbolp lambda-expr)
284         ("function*" function*)         ("function*" function*)
285         form))         form))
286    
# Line 293  Line 293 
293    (&define  ; makes top-level form not be wrapped    (&define  ; makes top-level form not be wrapped
294     [&or symbolp     [&or symbolp
295          (gate          (gate
296           symbolp &rest           symbolp &rest
297                   (&or [":conc-name" &or stringp "nil"]                   (&or [":conc-name" &or stringp "nil"]
298                        [":constructor" symbolp &optional cl-lambda-list]                        [":constructor" symbolp &optional cl-lambda-list]
299                        [":copier" symbolp]                        [":copier" symbolp]
# Line 329  Line 329 
329    
330  (def-edebug-spec loop  (def-edebug-spec loop
331    ([&optional ["named" symbolp]]    ([&optional ["named" symbolp]]
332     [&rest     [&rest
333      &or      &or
334      ["repeat" form]      ["repeat" form]
335      loop-for-as      loop-for-as
# Line 351  Line 351 
351     &rest ["and" loop-for-as-subclause]))     &rest ["and" loop-for-as-subclause]))
352    
353  (def-edebug-spec loop-for-as-subclause  (def-edebug-spec loop-for-as-subclause
354    (loop-var    (loop-var
355     loop-type-spec     loop-type-spec
356     &or     &or
357     [[&or "in" "on" "in-ref" "across-ref"]     [[&or "in" "on" "in-ref" "across-ref"]
358      form &optional ["by" function-form]]      form &optional ["by" function-form]]
359    
360     ["=" form &optional ["then" form]]     ["=" form &optional ["then" form]]
361     ["across" form]     ["across" form]
362     ["being"     ["being"
363      [&or "the" "each"]      [&or "the" "each"]
364      &or      &or
365      [[&or "element" "elements"]      [[&or "element" "elements"]
366       [&or "of" "in" "of-ref"] form       [&or "of" "in" "of-ref"] form
367       &optional "using" ["index" symbolp]];; is this right?       &optional "using" ["index" symbolp]];; is this right?
368      [[&or "hash-key" "hash-keys"      [[&or "hash-key" "hash-keys"
369            "hash-value" "hash-values"]            "hash-value" "hash-values"]
370       [&or "of" "in"]       [&or "of" "in"]
371       hash-table-p &optional ["using" ([&or "hash-value" "hash-values"       hash-table-p &optional ["using" ([&or "hash-value" "hash-values"
372                                             "hash-key" "hash-keys"] sexp)]]                                             "hash-key" "hash-keys"] sexp)]]
373                                            
374      [[&or "symbol" "present-symbol" "external-symbol"      [[&or "symbol" "present-symbol" "external-symbol"
375            "symbols" "present-symbols" "external-symbols"]            "symbols" "present-symbols" "external-symbols"]
376       [&or "in" "of"] package-p]       [&or "in" "of"] package-p]
377        
378      ;; Extensions for Emacs Lisp, including Lucid Emacs.      ;; Extensions for Emacs Lisp, including Lucid Emacs.
379      [[&or "frame" "frames"      [[&or "frame" "frames"
380            "screen" "screens"            "screen" "screens"
381            "buffer" "buffers"]]            "buffer" "buffers"]]
382    
383      [[&or "window" "windows"]      [[&or "window" "windows"]
384       [&or "of" "in"] form]       [&or "of" "in"] form]
385    
386      [[&or "overlay" "overlays"      [[&or "overlay" "overlays"
# Line 388  Line 388 
388       [&or "of" "in"] form       [&or "of" "in"] form
389       &optional [[&or "from" "to"] form]]       &optional [[&or "from" "to"] form]]
390    
391      [[&or "interval" "intervals"]      [[&or "interval" "intervals"]
392       [&or "in" "of"] form       [&or "in" "of"] form
393       &optional [[&or "from" "to"] form]       &optional [[&or "from" "to"] form]
394       ["property" form]]       ["property" form]]
395        
396      [[&or "key-code" "key-codes"      [[&or "key-code" "key-codes"
397            "key-seq" "key-seqs"            "key-seq" "key-seqs"
398            "key-binding" "key-bindings"]            "key-binding" "key-bindings"]
399       [&or "in" "of"] form       [&or "in" "of"] form
400       &optional ["using" ([&or "key-code" "key-codes"       &optional ["using" ([&or "key-code" "key-codes"
401                                "key-seq" "key-seqs"                                "key-seq" "key-seqs"
402                                "key-binding" "key-bindings"]                                "key-binding" "key-bindings"]
403                           sexp)]]                           sexp)]]
404      ;; For arbitrary extensions, recognize anything else.      ;; For arbitrary extensions, recognize anything else.
405      [symbolp &rest &or symbolp form]      [symbolp &rest &or symbolp form]
406      ]      ]
407      
408     ;; arithmetic - must be last since all parts are optional.     ;; arithmetic - must be last since all parts are optional.
409     [[&optional [[&or "from" "downfrom" "upfrom"] form]]     [[&optional [[&or "from" "downfrom" "upfrom"] form]]
410      [&optional [[&or "to" "downto" "upto" "below" "above"] form]]      [&optional [[&or "to" "downto" "upto" "below" "above"] form]]
# Line 412  Line 412 
412      ]))      ]))
413    
414  (def-edebug-spec loop-initial-final  (def-edebug-spec loop-initial-final
415    (&or ["initially"    (&or ["initially"
416          ;; [&optional &or "do" "doing"]  ;; CLtL2 doesn't allow this.          ;; [&optional &or "do" "doing"]  ;; CLtL2 doesn't allow this.
417          &rest loop-non-atomic-expr]          &rest loop-non-atomic-expr]
418         ["finally" &or         ["finally" &or
419          [[&optional &or "do" "doing"] &rest loop-non-atomic-expr]          [[&optional &or "do" "doing"] &rest loop-non-atomic-expr]
420          ["return" form]]))          ["return" form]]))
421    
# Line 425  Line 425 
425  (def-edebug-spec loop-clause  (def-edebug-spec loop-clause
426    (&or    (&or
427     [[&or "while" "until" "always" "never" "thereis"] form]     [[&or "while" "until" "always" "never" "thereis"] form]
428        
429     [[&or "collect" "collecting"     [[&or "collect" "collecting"
430           "append" "appending"           "append" "appending"
431           "nconc" "nconcing"           "nconc" "nconcing"
432           "concat" "vconcat"] form           "concat" "vconcat"] form
433           [&optional ["into" loop-var]]]           [&optional ["into" loop-var]]]
434    
435     [[&or "count" "counting"     [[&or "count" "counting"
# Line 455  Line 455 
455    
456  (def-edebug-spec loop-var  (def-edebug-spec loop-var
457    ;; The symbolp must be last alternative to recognize e.g. (a b . c)    ;; The symbolp must be last alternative to recognize e.g. (a b . c)
458    ;; loop-var =>    ;; loop-var =>
459    ;; (loop-var . [&or nil loop-var])    ;; (loop-var . [&or nil loop-var])
460    ;; (symbolp . [&or nil loop-var])    ;; (symbolp . [&or nil loop-var])
461    ;; (symbolp . loop-var)    ;; (symbolp . loop-var)

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.11.8.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26