diff options
| author | Gemini Lasswell | 2017-10-16 11:09:29 -0700 |
|---|---|---|
| committer | Gemini Lasswell | 2017-10-16 11:09:29 -0700 |
| commit | fb4200a87555c2e69cc66eea1ae9a55e8be3bbf3 (patch) | |
| tree | c4fa262f37248ffbdf600cd96eb1f194a46ef7cd | |
| parent | db68cefe72e5c68fa81796028a52de1b8e6480aa (diff) | |
| download | emacs-fb4200a87555c2e69cc66eea1ae9a55e8be3bbf3.tar.gz emacs-fb4200a87555c2e69cc66eea1ae9a55e8be3bbf3.zip | |
Fix Edebug spec for cl-defun (bug#24255)
* lisp/emacs-lisp/cl-macs.el: Modify the Edebug spec for
`cl-lambda-list' to support destructuring argument lists.
(cl-defun, cl-defmacro): Fix spelling errors in docstrings.
* lisp/textmodes/rst.el: Remove alternate version of Edebug
specs for `cl-lambda-list' and `cl-type-spec'.
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 32 | ||||
| -rw-r--r-- | lisp/textmodes/rst.el | 16 |
2 files changed, 23 insertions, 25 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 40eda1e0d65..e313af24975 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -193,20 +193,34 @@ The name is made by appending a number to PREFIX, default \"T\"." | |||
| 193 | (&or lambda-doc cl-declarations)) | 193 | (&or lambda-doc cl-declarations)) |
| 194 | 194 | ||
| 195 | (def-edebug-spec cl-lambda-list | 195 | (def-edebug-spec cl-lambda-list |
| 196 | (([&rest arg] | 196 | (([&rest cl-lambda-arg] |
| 197 | [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] | 197 | [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] |
| 198 | [&optional ["&rest" arg]] | 198 | [&optional ["&rest" cl-lambda-arg]] |
| 199 | [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] | 199 | [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] |
| 200 | &optional "&allow-other-keys"]] | 200 | &optional "&allow-other-keys"]] |
| 201 | [&optional ["&aux" &rest | 201 | [&optional ["&aux" &rest |
| 202 | &or (symbolp &optional def-form) symbolp]] | 202 | &or (symbolp &optional def-form) symbolp]] |
| 203 | ))) | 203 | . [&or arg nil]))) |
| 204 | 204 | ||
| 205 | (def-edebug-spec cl-&optional-arg | 205 | (def-edebug-spec cl-&optional-arg |
| 206 | (&or (arg &optional def-form arg) arg)) | 206 | (&or (cl-lambda-arg &optional def-form arg) arg)) |
| 207 | 207 | ||
| 208 | (def-edebug-spec cl-&key-arg | 208 | (def-edebug-spec cl-&key-arg |
| 209 | (&or ([&or (symbolp arg) arg] &optional def-form arg) arg)) | 209 | (&or ([&or (symbolp cl-lambda-arg) arg] &optional def-form arg) arg)) |
| 210 | |||
| 211 | (def-edebug-spec cl-lambda-arg | ||
| 212 | (&or arg cl-lambda-list1)) | ||
| 213 | |||
| 214 | (def-edebug-spec cl-lambda-list1 | ||
| 215 | (([&optional ["&whole" arg]] ;; only allowed at lower levels | ||
| 216 | [&rest cl-lambda-arg] | ||
| 217 | [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] | ||
| 218 | [&optional ["&rest" cl-lambda-arg]] | ||
| 219 | [&optional ["&key" cl-&key-arg &rest cl-&key-arg | ||
| 220 | &optional "&allow-other-keys"]] | ||
| 221 | [&optional ["&aux" &rest | ||
| 222 | &or (symbolp &optional def-form) symbolp]] | ||
| 223 | . [&or arg nil]))) | ||
| 210 | 224 | ||
| 211 | (def-edebug-spec cl-type-spec sexp) | 225 | (def-edebug-spec cl-type-spec sexp) |
| 212 | 226 | ||
| @@ -336,8 +350,8 @@ The full form of a Common Lisp function argument list is | |||
| 336 | [&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]] | 350 | [&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]] |
| 337 | [&aux (VAR [INITFORM])...]) | 351 | [&aux (VAR [INITFORM])...]) |
| 338 | 352 | ||
| 339 | VAR maybe be replaced recursively with an argument list for | 353 | VAR may be replaced recursively with an argument list for |
| 340 | destructing, `&whole' is supported within these sublists. If | 354 | destructuring, `&whole' is supported within these sublists. If |
| 341 | SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be | 355 | SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be |
| 342 | written simply `VAR'. See the Info node `(cl)Argument Lists' for | 356 | written simply `VAR'. See the Info node `(cl)Argument Lists' for |
| 343 | more details. | 357 | more details. |
| @@ -430,8 +444,8 @@ The full form of a Common Lisp macro argument list is | |||
| 430 | [&aux (VAR [INITFORM])...] | 444 | [&aux (VAR [INITFORM])...] |
| 431 | [&environment VAR]) | 445 | [&environment VAR]) |
| 432 | 446 | ||
| 433 | VAR maybe be replaced recursively with an argument list for | 447 | VAR may be replaced recursively with an argument list for |
| 434 | destructing, `&whole' is supported within these sublists. If | 448 | destructuring, `&whole' is supported within these sublists. If |
| 435 | SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be | 449 | SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be |
| 436 | written simply `VAR'. See the Info node `(cl)Argument Lists' for | 450 | written simply `VAR'. See the Info node `(cl)Argument Lists' for |
| 437 | more details. | 451 | more details. |
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 146d9b95f1a..315059e1107 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el | |||
| @@ -109,22 +109,6 @@ | |||
| 109 | (def-edebug-spec push | 109 | (def-edebug-spec push |
| 110 | (&or [form symbolp] [form gv-place])) | 110 | (&or [form symbolp] [form gv-place])) |
| 111 | 111 | ||
| 112 | ;; Correct wrong declaration. This still doesn't support dotted destructuring | ||
| 113 | ;; though. | ||
| 114 | (def-edebug-spec cl-lambda-list | ||
| 115 | (([&rest cl-macro-arg] | ||
| 116 | [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] | ||
| 117 | [&optional ["&rest" arg]] | ||
| 118 | [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] | ||
| 119 | &optional "&allow-other-keys"]] | ||
| 120 | [&optional ["&aux" &rest | ||
| 121 | &or (symbolp &optional def-form) symbolp]] | ||
| 122 | ))) | ||
| 123 | |||
| 124 | ;; Add missing declaration. | ||
| 125 | (def-edebug-spec cl-type-spec sexp) ;; This is not exactly correct but good | ||
| 126 | ;; enough. | ||
| 127 | |||
| 128 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 112 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 129 | ;; Support for `testcover' | 113 | ;; Support for `testcover' |
| 130 | 114 | ||