edebug / cl-specs.el

Diff from to

cl-specs.el

 ;;; cl-specs.el --- Edebug specs for cl.el
 
 ;; Copyright (C) 1993 Free Software Foundation, Inc.
+;; Copyright (C) 2002 Ben Wing.
 ;; Author: Daniel LaLiberte <liberte@holonexus.org>
 ;; Keywords: lisp, tools, maint
 
 (def-edebug-spec symbol-macrolet 
   ((&rest (symbol sexp)) cl-declarations body))
 
+;; XEmacs change: Should look like inner macro lists, not outer ones,
+;; because &environment is not allowed. --ben
 (def-edebug-spec destructuring-bind
-  (&define cl-macro-list form cl-declarations def-body))
+  (&define cl-macro-list1 form cl-declarations def-body))
 
 ;; Setf
 
 ;; Note that &environment is only allowed as first or last items in the 
 ;; top level list.
 
+;; XEmacs change.  #### In fact, CLTL2 says &environment can occur anywhere
+;; in the list.  The list can also be dotted.  Yuck, &environment can occur
+;; only once, even though anywhere in the list -- how do I encode that? 
+;; Also had to add the &or and separate; otherwise dotted specs were
+;; causing errors.  --ben
+
 (def-edebug-spec cl-macro-list
-  (([&optional "&environment" arg]
+  (&or
+   ([&optional "&environment" arg]
+    [&optional "&whole" arg]
+    [&optional "&environment" arg]
+    [&rest cl-macro-arg]
+    . [&or arg nil])
+
+   ([&optional "&environment" arg]
+    [&optional "&whole" arg]
+    [&optional "&environment" arg]
+    [&rest cl-macro-arg]
+    [&optional "&environment" arg]
+    [&optional ["&optional" &rest 
+		&or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
+    [&optional "&environment" arg]
+    [&optional [[&or "&rest" "&body"] cl-macro-arg]]
+    [&optional "&environment" arg]
+    [&optional ["&key" [&rest 
+			[&or ([&or (symbolp cl-macro-arg) arg] 
+			      &optional def-form cl-macro-arg)
+			     arg]]
+		&optional "&allow-other-keywords"]]
+    [&optional "&environment" arg]
+    [&optional ["&aux" &rest
+		&or (symbolp &optional def-form) symbolp]]
+    [&optional "&environment" arg]
+    )))
+
+(def-edebug-spec cl-macro-arg
+  (&or arg cl-macro-list1))
+
+(def-edebug-spec cl-macro-list1
+  (&or
+   ([&optional "&whole" arg]
+    [&rest cl-macro-arg]
+    . [&or arg nil])
+
+   ([&optional "&whole" arg]
     [&rest cl-macro-arg]
     [&optional ["&optional" &rest 
 		&or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
 		&optional "&allow-other-keywords"]]
     [&optional ["&aux" &rest
 		&or (symbolp &optional def-form) symbolp]]
-    [&optional "&environment" arg]
     )))
 
-(def-edebug-spec cl-macro-arg
-  (&or arg cl-macro-list1))
-
-(def-edebug-spec cl-macro-list1
-  (([&optional "&whole" arg]  ;; only allowed at lower levels
-    [&rest cl-macro-arg]
-    [&optional ["&optional" &rest 
-		&or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
-    [&optional [[&or "&rest" "&body"] cl-macro-arg]]
-    [&optional ["&key" [&rest 
-			[&or ([&or (symbolp cl-macro-arg) arg] 
-			      &optional def-form cl-macro-arg)
-			     arg]]
-		&optional "&allow-other-keywords"]]
-    [&optional ["&aux" &rest
-		&or (symbolp &optional def-form) symbolp]]
-    . [&or arg nil])))
-
 
 (def-edebug-spec defun*
   ;; Same as defun but use cl-lambda-list.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.