Commit b581bb5c authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/emacs-lisp/lisp-mode.el (doc-string-elt): Move those properties to

their respective macro declarations.
* lisp/skeleton.el (define-skeleton):
* lisp/progmodes/compile.el (define-compilation-mode):
* lisp/ibuf-macs.el (define-ibuffer-sorter, define-ibuffer-op)
(define-ibuffer-filter):
* lisp/emacs-lisp/generic.el (define-generic-mode):
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode)
(define-globalized-minor-mode):
* lisp/emacs-lisp/cl-macs.el (defun*, defmacro*, defstruct, deftype):
* lisp/emacs-lisp/byte-run.el (defsubst):
* lisp/custom.el (deftheme): Add doc-string metadata.
parent 70b8ef8f
2012-05-18 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/lisp-mode.el (doc-string-elt): Move those properties to
their respective macro declarations.
* skeleton.el (define-skeleton):
* progmodes/compile.el (define-compilation-mode):
* ibuf-macs.el (define-ibuffer-sorter, define-ibuffer-op)
(define-ibuffer-filter):
* emacs-lisp/generic.el (define-generic-mode):
* emacs-lisp/easy-mmode.el (define-minor-mode)
(define-globalized-minor-mode):
* emacs-lisp/cl-macs.el (defun*, defmacro*, defstruct, deftype):
* emacs-lisp/byte-run.el (defsubst):
* custom.el (deftheme): Add doc-string metadata.
2012-05-17 Stefan Monnier <monnier@iro.umontreal.ca> 2012-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/cl-macs.el, emacs-lisp/cl.el: Move indent info. * emacs-lisp/cl-macs.el, emacs-lisp/cl.el: Move indent info.
......
...@@ -522,6 +522,9 @@ See also the function `define-overload'." ...@@ -522,6 +522,9 @@ See also the function `define-overload'."
(list (mode-local--override name args body)) (list (mode-local--override name args body))
result))) result)))
;;;###autoload
(put 'define-overloadable-function 'doc-string-elt 3)
(defmacro define-overloadable-function (name args docstring &rest body) (defmacro define-overloadable-function (name args docstring &rest body)
"Define a new function, as with `defun', which can be overloaded. "Define a new function, as with `defun', which can be overloaded.
NAME is the name of the function to create. NAME is the name of the function to create.
...@@ -546,6 +549,7 @@ defined. The default is to call the function `NAME-default' with the ...@@ -546,6 +549,7 @@ defined. The default is to call the function `NAME-default' with the
appropriate arguments deduced from ARGS. appropriate arguments deduced from ARGS.
OVERARGS is a list of arguments passed to the override and OVERARGS is a list of arguments passed to the override and
`NAME-default' function, in place of those deduced from ARGS." `NAME-default' function, in place of those deduced from ARGS."
(declare (doc-string 3))
`(eval-and-compile `(eval-and-compile
(defun ,name ,args (defun ,name ,args
,docstring ,docstring
......
...@@ -1048,6 +1048,7 @@ The optional argument DOC is a doc string describing the theme. ...@@ -1048,6 +1048,7 @@ The optional argument DOC is a doc string describing the theme.
Any theme `foo' should be defined in a file called `foo-theme.el'; Any theme `foo' should be defined in a file called `foo-theme.el';
see `custom-make-theme-feature' for more information." see `custom-make-theme-feature' for more information."
(declare (doc-string 2))
(let ((feature (custom-make-theme-feature theme))) (let ((feature (custom-make-theme-feature theme)))
;; It is better not to use backquote in this file, ;; It is better not to use backquote in this file,
;; because that makes a bootstrapping problem ;; because that makes a bootstrapping problem
......
...@@ -96,7 +96,7 @@ The return value of this function is not used." ...@@ -96,7 +96,7 @@ The return value of this function is not used."
;; This has a special byte-hunk-handler in bytecomp.el. ;; This has a special byte-hunk-handler in bytecomp.el.
(defmacro defsubst (name arglist &rest body) (defmacro defsubst (name arglist &rest body)
"Define an inline function. The syntax is just like that of `defun'." "Define an inline function. The syntax is just like that of `defun'."
(declare (debug defun)) (declare (debug defun) (doc-string 3))
(or (memq (get name 'byte-optimizer) (or (memq (get name 'byte-optimizer)
'(nil byte-compile-inline-expand)) '(nil byte-compile-inline-expand))
(error "`%s' is a primitive" name)) (error "`%s' is a primitive" name))
......
...@@ -286,7 +286,7 @@ This also does some trivial optimizations to make the form prettier. ...@@ -286,7 +286,7 @@ This also does some trivial optimizations to make the form prettier.
;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist ;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist
;;;;;; do* do loop return-from return block etypecase typecase ecase ;;;;;; do* do loop return-from return block etypecase typecase ecase
;;;;;; case load-time-value eval-when destructuring-bind function* ;;;;;; case load-time-value eval-when destructuring-bind function*
;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "ed94b3ba46080516e6ada69bdf617be5") ;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "c383ef0fa5f6d28796cd8e9cf65e1c5d")
;;; Generated autoloads from cl-macs.el ;;; Generated autoloads from cl-macs.el
(autoload 'gensym "cl-macs" "\ (autoload 'gensym "cl-macs" "\
...@@ -308,6 +308,10 @@ and BODY is implicitly surrounded by (block NAME ...). ...@@ -308,6 +308,10 @@ and BODY is implicitly surrounded by (block NAME ...).
\(fn NAME ARGLIST [DOCSTRING] BODY...)" nil (quote macro)) \(fn NAME ARGLIST [DOCSTRING] BODY...)" nil (quote macro))
(put 'defun* 'lisp-indent-function '2)
(put 'defun* 'doc-string-elt '3)
(autoload 'defmacro* "cl-macs" "\ (autoload 'defmacro* "cl-macs" "\
Define NAME as a macro. Define NAME as a macro.
Like normal `defmacro', except ARGLIST allows full Common Lisp conventions, Like normal `defmacro', except ARGLIST allows full Common Lisp conventions,
...@@ -315,6 +319,10 @@ and BODY is implicitly surrounded by (block NAME ...). ...@@ -315,6 +319,10 @@ and BODY is implicitly surrounded by (block NAME ...).
\(fn NAME ARGLIST [DOCSTRING] BODY...)" nil (quote macro)) \(fn NAME ARGLIST [DOCSTRING] BODY...)" nil (quote macro))
(put 'defmacro* 'lisp-indent-function '2)
(put 'defmacro* 'doc-string-elt '3)
(autoload 'function* "cl-macs" "\ (autoload 'function* "cl-macs" "\
Introduce a function. Introduce a function.
Like normal `function', except that if argument is a lambda form, Like normal `function', except that if argument is a lambda form,
...@@ -327,6 +335,8 @@ its argument list allows full Common Lisp conventions. ...@@ -327,6 +335,8 @@ its argument list allows full Common Lisp conventions.
\(fn ARGS EXPR &rest BODY)" nil (quote macro)) \(fn ARGS EXPR &rest BODY)" nil (quote macro))
(put 'destructuring-bind 'lisp-indent-function '2)
(autoload 'eval-when "cl-macs" "\ (autoload 'eval-when "cl-macs" "\
Control when BODY is evaluated. Control when BODY is evaluated.
If `compile' is in WHEN, BODY is evaluated when compiled at top-level. If `compile' is in WHEN, BODY is evaluated when compiled at top-level.
...@@ -335,6 +345,8 @@ If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level. ...@@ -335,6 +345,8 @@ If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level.
\(fn (WHEN...) BODY...)" nil (quote macro)) \(fn (WHEN...) BODY...)" nil (quote macro))
(put 'eval-when 'lisp-indent-function '1)
(autoload 'load-time-value "cl-macs" "\ (autoload 'load-time-value "cl-macs" "\
Like `progn', but evaluates the body at load time. Like `progn', but evaluates the body at load time.
The result of the body appears to the compiler as a quoted constant. The result of the body appears to the compiler as a quoted constant.
...@@ -352,12 +364,16 @@ Key values are compared by `eql'. ...@@ -352,12 +364,16 @@ Key values are compared by `eql'.
\(fn EXPR (KEYLIST BODY...)...)" nil (quote macro)) \(fn EXPR (KEYLIST BODY...)...)" nil (quote macro))
(put 'case 'lisp-indent-function '1)
(autoload 'ecase "cl-macs" "\ (autoload 'ecase "cl-macs" "\
Like `case', but error if no case fits. Like `case', but error if no case fits.
`otherwise'-clauses are not allowed. `otherwise'-clauses are not allowed.
\(fn EXPR (KEYLIST BODY...)...)" nil (quote macro)) \(fn EXPR (KEYLIST BODY...)...)" nil (quote macro))
(put 'ecase 'lisp-indent-function '1)
(autoload 'typecase "cl-macs" "\ (autoload 'typecase "cl-macs" "\
Evals EXPR, chooses among clauses on that value. Evals EXPR, chooses among clauses on that value.
Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it
...@@ -367,12 +383,16 @@ final clause, and matches if no other keys match. ...@@ -367,12 +383,16 @@ final clause, and matches if no other keys match.
\(fn EXPR (TYPE BODY...)...)" nil (quote macro)) \(fn EXPR (TYPE BODY...)...)" nil (quote macro))
(put 'typecase 'lisp-indent-function '1)
(autoload 'etypecase "cl-macs" "\ (autoload 'etypecase "cl-macs" "\
Like `typecase', but error if no case fits. Like `typecase', but error if no case fits.
`otherwise'-clauses are not allowed. `otherwise'-clauses are not allowed.
\(fn EXPR (TYPE BODY...)...)" nil (quote macro)) \(fn EXPR (TYPE BODY...)...)" nil (quote macro))
(put 'etypecase 'lisp-indent-function '1)
(autoload 'block "cl-macs" "\ (autoload 'block "cl-macs" "\
Define a lexically-scoped block named NAME. Define a lexically-scoped block named NAME.
NAME may be any symbol. Code inside the BODY forms can call `return-from' NAME may be any symbol. Code inside the BODY forms can call `return-from'
...@@ -385,6 +405,8 @@ called from BODY. ...@@ -385,6 +405,8 @@ called from BODY.
\(fn NAME &rest BODY)" nil (quote macro)) \(fn NAME &rest BODY)" nil (quote macro))
(put 'block 'lisp-indent-function '1)
(autoload 'return "cl-macs" "\ (autoload 'return "cl-macs" "\
Return from the block named nil. Return from the block named nil.
This is equivalent to `(return-from nil RESULT)'. This is equivalent to `(return-from nil RESULT)'.
...@@ -400,6 +422,8 @@ This is compatible with Common Lisp, but note that `defun' and ...@@ -400,6 +422,8 @@ This is compatible with Common Lisp, but note that `defun' and
\(fn NAME &optional RESULT)" nil (quote macro)) \(fn NAME &optional RESULT)" nil (quote macro))
(put 'return-from 'lisp-indent-function '1)
(autoload 'loop "cl-macs" "\ (autoload 'loop "cl-macs" "\
The Common Lisp `loop' macro. The Common Lisp `loop' macro.
Valid clauses are: Valid clauses are:
...@@ -421,11 +445,15 @@ The Common Lisp `do' loop. ...@@ -421,11 +445,15 @@ The Common Lisp `do' loop.
\(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil (quote macro)) \(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil (quote macro))
(put 'do 'lisp-indent-function '2)
(autoload 'do* "cl-macs" "\ (autoload 'do* "cl-macs" "\
The Common Lisp `do*' loop. The Common Lisp `do*' loop.
\(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil (quote macro)) \(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil (quote macro))
(put 'do* 'lisp-indent-function '2)
(autoload 'dolist "cl-macs" "\ (autoload 'dolist "cl-macs" "\
Loop over a list. Loop over a list.
Evaluate BODY with VAR bound to each `car' from LIST, in turn. Evaluate BODY with VAR bound to each `car' from LIST, in turn.
...@@ -449,11 +477,15 @@ from OBARRAY. ...@@ -449,11 +477,15 @@ from OBARRAY.
\(fn (VAR [OBARRAY [RESULT]]) BODY...)" nil (quote macro)) \(fn (VAR [OBARRAY [RESULT]]) BODY...)" nil (quote macro))
(put 'do-symbols 'lisp-indent-function '1)
(autoload 'do-all-symbols "cl-macs" "\ (autoload 'do-all-symbols "cl-macs" "\
\(fn SPEC &rest BODY)" nil (quote macro)) \(fn SPEC &rest BODY)" nil (quote macro))
(put 'do-all-symbols 'lisp-indent-function '1)
(autoload 'psetq "cl-macs" "\ (autoload 'psetq "cl-macs" "\
Set SYMs to the values VALs in parallel. Set SYMs to the values VALs in parallel.
This is like `setq', except that all VAL forms are evaluated (in order) This is like `setq', except that all VAL forms are evaluated (in order)
...@@ -471,6 +503,8 @@ a `let' form, except that the list of symbols can be computed at run-time. ...@@ -471,6 +503,8 @@ a `let' form, except that the list of symbols can be computed at run-time.
\(fn SYMBOLS VALUES &rest BODY)" nil (quote macro)) \(fn SYMBOLS VALUES &rest BODY)" nil (quote macro))
(put 'progv 'lisp-indent-function '2)
(autoload 'flet "cl-macs" "\ (autoload 'flet "cl-macs" "\
Make temporary function definitions. Make temporary function definitions.
This is an analogue of `let' that operates on the function cell of FUNC This is an analogue of `let' that operates on the function cell of FUNC
...@@ -480,6 +514,8 @@ go back to their previous definitions, or lack thereof). ...@@ -480,6 +514,8 @@ go back to their previous definitions, or lack thereof).
\(fn ((FUNC ARGLIST BODY...) ...) FORM...)" nil (quote macro)) \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" nil (quote macro))
(put 'flet 'lisp-indent-function '1)
(autoload 'labels "cl-macs" "\ (autoload 'labels "cl-macs" "\
Make temporary function bindings. Make temporary function bindings.
This is like `flet', except the bindings are lexical instead of dynamic. This is like `flet', except the bindings are lexical instead of dynamic.
...@@ -487,12 +523,16 @@ Unlike `flet', this macro is fully compliant with the Common Lisp standard. ...@@ -487,12 +523,16 @@ Unlike `flet', this macro is fully compliant with the Common Lisp standard.
\(fn ((FUNC ARGLIST BODY...) ...) FORM...)" nil (quote macro)) \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" nil (quote macro))
(put 'labels 'lisp-indent-function '1)
(autoload 'macrolet "cl-macs" "\ (autoload 'macrolet "cl-macs" "\
Make temporary macro definitions. Make temporary macro definitions.
This is like `flet', but for macros instead of functions. This is like `flet', but for macros instead of functions.
\(fn ((NAME ARGLIST BODY...) ...) FORM...)" nil (quote macro)) \(fn ((NAME ARGLIST BODY...) ...) FORM...)" nil (quote macro))
(put 'macrolet 'lisp-indent-function '1)
(autoload 'symbol-macrolet "cl-macs" "\ (autoload 'symbol-macrolet "cl-macs" "\
Make symbol macro definitions. Make symbol macro definitions.
Within the body FORMs, references to the variable NAME will be replaced Within the body FORMs, references to the variable NAME will be replaced
...@@ -500,6 +540,8 @@ by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...). ...@@ -500,6 +540,8 @@ by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...).
\(fn ((NAME EXPANSION) ...) FORM...)" nil (quote macro)) \(fn ((NAME EXPANSION) ...) FORM...)" nil (quote macro))
(put 'symbol-macrolet 'lisp-indent-function '1)
(autoload 'lexical-let "cl-macs" "\ (autoload 'lexical-let "cl-macs" "\
Like `let', but lexically scoped. Like `let', but lexically scoped.
The main visible difference is that lambdas inside BODY will create The main visible difference is that lambdas inside BODY will create
...@@ -507,6 +549,8 @@ lexical closures as in Common Lisp. ...@@ -507,6 +549,8 @@ lexical closures as in Common Lisp.
\(fn BINDINGS BODY)" nil (quote macro)) \(fn BINDINGS BODY)" nil (quote macro))
(put 'lexical-let 'lisp-indent-function '1)
(autoload 'lexical-let* "cl-macs" "\ (autoload 'lexical-let* "cl-macs" "\
Like `let*', but lexically scoped. Like `let*', but lexically scoped.
The main visible difference is that lambdas inside BODY, and in The main visible difference is that lambdas inside BODY, and in
...@@ -516,6 +560,8 @@ Common Lisp. ...@@ -516,6 +560,8 @@ Common Lisp.
\(fn BINDINGS BODY)" nil (quote macro)) \(fn BINDINGS BODY)" nil (quote macro))
(put 'lexical-let* 'lisp-indent-function '1)
(autoload 'multiple-value-bind "cl-macs" "\ (autoload 'multiple-value-bind "cl-macs" "\
Collect multiple return values. Collect multiple return values.
FORM must return a list; the BODY is then executed with the first N elements FORM must return a list; the BODY is then executed with the first N elements
...@@ -526,6 +572,8 @@ a synonym for (list A B C). ...@@ -526,6 +572,8 @@ a synonym for (list A B C).
\(fn (SYM...) FORM BODY)" nil (quote macro)) \(fn (SYM...) FORM BODY)" nil (quote macro))
(put 'multiple-value-bind 'lisp-indent-function '2)
(autoload 'multiple-value-setq "cl-macs" "\ (autoload 'multiple-value-setq "cl-macs" "\
Collect multiple return values. Collect multiple return values.
FORM must return a list; the first N elements of this list are stored in FORM must return a list; the first N elements of this list are stored in
...@@ -535,6 +583,8 @@ values. For compatibility, (values A B C) is a synonym for (list A B C). ...@@ -535,6 +583,8 @@ values. For compatibility, (values A B C) is a synonym for (list A B C).
\(fn (SYM...) FORM)" nil (quote macro)) \(fn (SYM...) FORM)" nil (quote macro))
(put 'multiple-value-setq 'lisp-indent-function '1)
(autoload 'locally "cl-macs" "\ (autoload 'locally "cl-macs" "\
...@@ -545,6 +595,8 @@ values. For compatibility, (values A B C) is a synonym for (list A B C). ...@@ -545,6 +595,8 @@ values. For compatibility, (values A B C) is a synonym for (list A B C).
\(fn TYPE FORM)" nil (quote macro)) \(fn TYPE FORM)" nil (quote macro))
(put 'the 'lisp-indent-function '1)
(autoload 'declare "cl-macs" "\ (autoload 'declare "cl-macs" "\
Declare SPECS about the current function while compiling. Declare SPECS about the current function while compiling.
For instance For instance
...@@ -649,6 +701,8 @@ the PLACE is not modified before executing BODY. ...@@ -649,6 +701,8 @@ the PLACE is not modified before executing BODY.
\(fn ((PLACE VALUE) ...) BODY...)" nil (quote macro)) \(fn ((PLACE VALUE) ...) BODY...)" nil (quote macro))
(put 'letf 'lisp-indent-function '1)
(autoload 'letf* "cl-macs" "\ (autoload 'letf* "cl-macs" "\
Temporarily bind to PLACEs. Temporarily bind to PLACEs.
This is the analogue of `let*', but with generalized variables (in the This is the analogue of `let*', but with generalized variables (in the
...@@ -661,6 +715,8 @@ the PLACE is not modified before executing BODY. ...@@ -661,6 +715,8 @@ the PLACE is not modified before executing BODY.
\(fn ((PLACE VALUE) ...) BODY...)" nil (quote macro)) \(fn ((PLACE VALUE) ...) BODY...)" nil (quote macro))
(put 'letf* 'lisp-indent-function '1)
(autoload 'callf "cl-macs" "\ (autoload 'callf "cl-macs" "\
Set PLACE to (FUNC PLACE ARGS...). Set PLACE to (FUNC PLACE ARGS...).
FUNC should be an unquoted function name. PLACE may be a symbol, FUNC should be an unquoted function name. PLACE may be a symbol,
...@@ -668,12 +724,16 @@ or any generalized variable allowed by `setf'. ...@@ -668,12 +724,16 @@ or any generalized variable allowed by `setf'.
\(fn FUNC PLACE ARGS...)" nil (quote macro)) \(fn FUNC PLACE ARGS...)" nil (quote macro))
(put 'callf 'lisp-indent-function '2)
(autoload 'callf2 "cl-macs" "\ (autoload 'callf2 "cl-macs" "\
Set PLACE to (FUNC ARG1 PLACE ARGS...). Set PLACE to (FUNC ARG1 PLACE ARGS...).
Like `callf', but PLACE is the second argument of FUNC, not the first. Like `callf', but PLACE is the second argument of FUNC, not the first.
\(fn FUNC ARG1 PLACE ARGS...)" nil (quote macro)) \(fn FUNC ARG1 PLACE ARGS...)" nil (quote macro))
(put 'callf2 'lisp-indent-function '3)
(autoload 'define-modify-macro "cl-macs" "\ (autoload 'define-modify-macro "cl-macs" "\
Define a `setf'-like modify macro. Define a `setf'-like modify macro.
If NAME is called, it combines its PLACE argument with the other arguments If NAME is called, it combines its PLACE argument with the other arguments
...@@ -699,6 +759,8 @@ value, that slot cannot be set via `setf'. ...@@ -699,6 +759,8 @@ value, that slot cannot be set via `setf'.
\(fn NAME SLOTS...)" nil (quote macro)) \(fn NAME SLOTS...)" nil (quote macro))
(put 'defstruct 'doc-string-elt '2)
(autoload 'cl-struct-setf-expander "cl-macs" "\ (autoload 'cl-struct-setf-expander "cl-macs" "\
...@@ -710,6 +772,8 @@ The type name can then be used in `typecase', `check-type', etc. ...@@ -710,6 +772,8 @@ The type name can then be used in `typecase', `check-type', etc.
\(fn NAME ARGLIST &rest BODY)" nil (quote macro)) \(fn NAME ARGLIST &rest BODY)" nil (quote macro))
(put 'deftype 'doc-string-elt '3)
(autoload 'typep "cl-macs" "\ (autoload 'typep "cl-macs" "\
Check that OBJECT is of type TYPE. Check that OBJECT is of type TYPE.
TYPE is a Common Lisp-style type specifier. TYPE is a Common Lisp-style type specifier.
......
...@@ -227,6 +227,7 @@ and BODY is implicitly surrounded by (block NAME ...). ...@@ -227,6 +227,7 @@ and BODY is implicitly surrounded by (block NAME ...).
cl-declarations-or-string cl-declarations-or-string
[&optional ("interactive" interactive)] [&optional ("interactive" interactive)]
def-body)) def-body))
(doc-string 3)
(indent 2)) (indent 2))
(let* ((res (cl-transform-lambda (cons args body) name)) (let* ((res (cl-transform-lambda (cons args body) name))
(form (list* 'defun name (cdr res)))) (form (list* 'defun name (cdr res))))
...@@ -279,6 +280,7 @@ and BODY is implicitly surrounded by (block NAME ...). ...@@ -279,6 +280,7 @@ and BODY is implicitly surrounded by (block NAME ...).
\(fn NAME ARGLIST [DOCSTRING] BODY...)" \(fn NAME ARGLIST [DOCSTRING] BODY...)"
(declare (debug (declare (debug
(&define name cl-macro-list cl-declarations-or-string def-body)) (&define name cl-macro-list cl-declarations-or-string def-body))
(doc-string 3)
(indent 2)) (indent 2))
(let* ((res (cl-transform-lambda (cons args body) name)) (let* ((res (cl-transform-lambda (cons args body) name))
(form (list* 'defmacro name (cdr res)))) (form (list* 'defmacro name (cdr res))))
...@@ -2587,7 +2589,8 @@ one keyword is supported, `:read-only'. If this has a non-nil ...@@ -2587,7 +2589,8 @@ one keyword is supported, `:read-only'. If this has a non-nil
value, that slot cannot be set via `setf'. value, that slot cannot be set via `setf'.
\(fn NAME SLOTS...)" \(fn NAME SLOTS...)"
(declare (debug (declare (doc-string 2)
(debug
(&define ;Makes top-level form not be wrapped. (&define ;Makes top-level form not be wrapped.
[&or symbolp [&or symbolp
(gate (gate
...@@ -2854,7 +2857,7 @@ value, that slot cannot be set via `setf'. ...@@ -2854,7 +2857,7 @@ value, that slot cannot be set via `setf'.
(defmacro deftype (name arglist &rest body) (defmacro deftype (name arglist &rest body)
"Define NAME as a new data type. "Define NAME as a new data type.
The type name can then be used in `typecase', `check-type', etc." The type name can then be used in `typecase', `check-type', etc."
(declare (debug defmacro*)) (declare (debug defmacro*) (doc-string 3))
(list 'eval-when '(compile load eval) (list 'eval-when '(compile load eval)
(cl-transform-function-property (cl-transform-function-property
name 'cl-deftype-handler (cons (list* '&cl-defs ''('*) arglist) body)))) name 'cl-deftype-handler (cons (list* '&cl-defs ''('*) arglist) body))))
......
...@@ -656,6 +656,15 @@ If ALIST is non-nil, the new pairs are prepended to it." ...@@ -656,6 +656,15 @@ If ALIST is non-nil, the new pairs are prepended to it."
(fmakunbound 'dolist) (fmakunbound 'dolist)
(fmakunbound 'dotimes) (fmakunbound 'dotimes)
(fmakunbound 'declare) (fmakunbound 'declare)
;;;###autoload
(progn
;; Autoload, so autoload.el and font-lock can use it even when CL
;; is not loaded.
(put 'defun* 'doc-string-elt 3)
(put 'defmacro* 'doc-string-elt 3)
(put 'defsubst 'doc-string-elt 3)
(put 'defstruct 'doc-string-elt 2))
(load "cl-loaddefs" nil 'quiet) (load "cl-loaddefs" nil 'quiet)
;; This goes here so that cl-macs can find it if it loads right now. ;; This goes here so that cl-macs can find it if it loads right now.
......
...@@ -142,7 +142,8 @@ For example, you could write ...@@ -142,7 +142,8 @@ For example, you could write
(define-minor-mode foo-mode \"If enabled, foo on you!\" (define-minor-mode foo-mode \"If enabled, foo on you!\"
:lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\" :lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\"
...BODY CODE...)" ...BODY CODE...)"
(declare (debug (&define name stringp (declare (doc-string 2)
(debug (&define name stringp
[&optional [&not keywordp] sexp [&optional [&not keywordp] sexp
&optional [&not keywordp] sexp &optional [&not keywordp] sexp
&optional [&not keywordp] sexp] &optional [&not keywordp] sexp]
...@@ -335,7 +336,7 @@ enabled, then disabling and reenabling MODE should make MODE work ...@@ -335,7 +336,7 @@ enabled, then disabling and reenabling MODE should make MODE work
correctly with the current major mode. This is important to correctly with the current major mode. This is important to
prevent problems with derived modes, that is, major modes that prevent problems with derived modes, that is, major modes that
call another major mode in their body." call another major mode in their body."
(declare (doc-string 2))
(let* ((global-mode-name (symbol-name global-mode)) (let* ((global-mode-name (symbol-name global-mode))
(pretty-name (easy-mmode-pretty-mode-name mode)) (pretty-name (easy-mmode-pretty-mode-name mode))
(pretty-global-name (easy-mmode-pretty-mode-name global-mode)) (pretty-global-name (easy-mmode-pretty-mode-name global-mode))
......
...@@ -151,7 +151,8 @@ mode hook `MODE-hook'. ...@@ -151,7 +151,8 @@ mode hook `MODE-hook'.
See the file generic-x.el for some examples of `define-generic-mode'." See the file generic-x.el for some examples of `define-generic-mode'."
(declare (debug (sexp def-form def-form def-form form def-form (declare (debug (sexp def-form def-form def-form form def-form
[&optional stringp] &rest [keywordp form])) [&optional stringp] &rest [keywordp form]))
(indent 1)) (indent 1)
(doc-string 7))
;; Backward compatibility. ;; Backward compatibility.
(when (eq (car-safe mode) 'quote) (when (eq (car-safe mode) 'quote)
......
...@@ -136,34 +136,14 @@ It has `lisp-mode-abbrev-table' as its parent." ...@@ -136,34 +136,14 @@ It has `lisp-mode-abbrev-table' as its parent."
;; This was originally in autoload.el and is still used there. ;; This was originally in autoload.el and is still used there.
(put 'autoload 'doc-string-elt 3)