aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoam Postavsky2016-07-01 23:53:26 -0400
committerNoam Postavsky2016-07-09 10:58:55 -0400
commitaac62a67dde02f086ae495edbc12a5046143812a (patch)
treedbd7a7efd66c4bbf22bba40ebfaf70117edc7f4e
parentd6aa4da832712a720f9a85e850af1206c6f070bc (diff)
downloademacs-aac62a67dde02f086ae495edbc12a5046143812a.tar.gz
emacs-aac62a67dde02f086ae495edbc12a5046143812a.zip
Add details to cl-lib defining macros' docstrings
* lisp/emacs-lisp/cl-macs.el (cl-defun, cl-defmacro): Add terse summary of supported arglist forms (Bug #22462).
-rw-r--r--lisp/emacs-lisp/cl-macs.el29
1 files changed, 29 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 2cb821edcd3..c51ed9d8770 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -327,6 +327,20 @@ FORM is of the form (ARGS . BODY)."
327Like normal `defun', except ARGLIST allows full Common Lisp conventions, 327Like normal `defun', except ARGLIST allows full Common Lisp conventions,
328and BODY is implicitly surrounded by (cl-block NAME ...). 328and BODY is implicitly surrounded by (cl-block NAME ...).
329 329
330The full form of a Common Lisp function argument list is
331
332 (VAR...
333 [&optional (VAR [INITFORM [SVAR]])...]
334 [&rest|&body VAR]
335 [&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]]
336 [&aux (VAR [INITFORM])...])
337
338VAR maybe be replaced recursively with an argument list for
339destructing, `&whole' is supported within these sublists. If
340SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be
341written simply `VAR'. See the Info node `(cl)Argument Lists' for
342more details.
343
330\(fn NAME ARGLIST [DOCSTRING] BODY...)" 344\(fn NAME ARGLIST [DOCSTRING] BODY...)"
331 (declare (debug 345 (declare (debug
332 ;; Same as defun but use cl-lambda-list. 346 ;; Same as defun but use cl-lambda-list.
@@ -406,6 +420,21 @@ and BODY is implicitly surrounded by (cl-block NAME ...).
406Like normal `defmacro', except ARGLIST allows full Common Lisp conventions, 420Like normal `defmacro', except ARGLIST allows full Common Lisp conventions,
407and BODY is implicitly surrounded by (cl-block NAME ...). 421and BODY is implicitly surrounded by (cl-block NAME ...).
408 422
423The full form of a Common Lisp macro argument list is
424
425 (VAR...
426 [&optional (VAR [INITFORM [SVAR]])...]
427 [&rest|&body VAR]
428 [&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]]
429 [&aux (VAR [INITFORM])...]
430 [&environment VAR])
431
432VAR maybe be replaced recursively with an argument list for
433destructing, `&whole' is supported within these sublists. If
434SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be
435written simply `VAR'. See the Info node `(cl)Argument Lists' for
436more details.
437
409\(fn NAME ARGLIST [DOCSTRING] BODY...)" 438\(fn NAME ARGLIST [DOCSTRING] BODY...)"
410 (declare (debug 439 (declare (debug
411 (&define name cl-macro-list cl-declarations-or-string def-body)) 440 (&define name cl-macro-list cl-declarations-or-string def-body))