Mark def* macros for indentation
* lisp/widget.el (define-widget-keywords): * lisp/vc/pcvs.el (defun-cvs-mode): * lisp/subr.el (defvar-local): (defvar-keymap): * lisp/skeleton.el (define-skeleton): * lisp/simple.el (define-alternatives): * lisp/progmodes/gud.el (gdb-script-mode): * lisp/progmodes/gdb-mi.el (def-gdb-preempt-display-buffer): (def-gdb-auto-update-trigger): (def-gdb-auto-update-handler): (def-gdb-trigger-and-handler): (def-gdb-thread-buffer-command): (def-gdb-thread-buffer-simple-command): (def-gdb-thread-buffer-gud-command): (def-gdb-set-positive-number): (def-gdb-memory-format): (def-gdb-memory-unit): (def-gdb-memory-show-page): * lisp/progmodes/compile.el (define-compilation-mode): * lisp/progmodes/cc-vars.el (defcustom-c-stylevar): * lisp/obsolete/cl.el (define-setf-expander): (defsetf): (define-modify-macro): * lisp/obsolete/cl-compat.el (defkeyword): * lisp/net/hmac-def.el (define-hmac-function): * lisp/international/mule-conf.el (define-iso-single-byte-charset): * lisp/international/ccl.el (define-ccl-program): * lisp/image.el (defimage): * lisp/gnus/gmm-utils.el (defun-gmm): * lisp/ezimage.el (defezimage): * lisp/erc/erc.el (define-erc-module): * lisp/emacs-lisp/shortdoc.el (define-short-documentation-group): * lisp/emacs-lisp/eieio.el (defclass): * lisp/emacs-lisp/eieio-compat.el (defgeneric): (defmethod): * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): (define-globalized-minor-mode): * lisp/emacs-lisp/derived.el (define-derived-mode): * lisp/emacs-lisp/byte-run.el (defsubst): (define-obsolete-function-alias): (define-obsolete-variable-alias): * lisp/custom.el (defcustom): (defface): (defgroup): (deftheme): * lisp/cedet/semantic/wisent.el (define-wisent-lexer): * lisp/cedet/semantic/lex.el (define-lex): (define-lex-analyzer): (define-lex-regex-analyzer): (define-lex-simple-regex-analyzer): (define-lex-block-analyzer): (define-lex-keyword-type-analyzer): (define-lex-sexp-type-analyzer): (define-lex-regex-type-analyzer): (define-lex-string-type-analyzer): (define-lex-block-type-analyzer): * lisp/cedet/semantic/lex-spp.el (define-lex-spp-macro-declaration-analyzer): (define-lex-spp-macro-undeclaration-analyzer): (define-lex-spp-include-analyzer): * lisp/cedet/semantic/dep.el (defcustom-mode-local-semantic-dependency-system-include-path): * lisp/cedet/semantic/decorate/mode.el (define-semantic-decoration-style): * lisp/cedet/mode-local.el (define-child-mode): (define-overloadable-function): (define-mode-local-override): * lisp/calc/calc.el (defcalcmodevar): (defmath): Explicitly mark all macros that have names that start with "def" that should indent defunly-like (bug#43329).
This commit is contained in:
parent
43f59b91aa
commit
3b3211c023
32 changed files with 78 additions and 39 deletions
|
@ -494,7 +494,7 @@ This setting only applies to floats in normal display mode.")
|
|||
(defmacro defcalcmodevar (var defval &optional doc)
|
||||
"Declare VAR as a Calc variable, with default value DEFVAL and doc-string DOC.
|
||||
The variable VAR will be added to `calc-mode-var-list'."
|
||||
(declare (doc-string 3))
|
||||
(declare (doc-string 3) (indent defun))
|
||||
`(progn
|
||||
(defvar ,var ,defval ,doc)
|
||||
(add-to-list 'calc-mode-var-list (list (quote ,var) ,defval))))
|
||||
|
@ -3439,7 +3439,7 @@ The prefix `calcFunc-' is added to the specified name to get the
|
|||
actual Lisp function name.
|
||||
|
||||
See Info node `(calc)Defining Functions'."
|
||||
(declare (doc-string 3)) ;; FIXME: Edebug spec?
|
||||
(declare (doc-string 3) (indent defun)) ;; FIXME: Edebug spec?
|
||||
(require 'calc-ext)
|
||||
(math-do-defmath func args body))
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ local variables have been defined."
|
|||
DOCSTRING is optional and not used.
|
||||
To work properly, this should be put after PARENT mode local variables
|
||||
definition."
|
||||
(declare (obsolete define-derived-mode "27.1"))
|
||||
(declare (obsolete define-derived-mode "27.1") (indent 2))
|
||||
`(mode-local--set-parent ',mode ',parent))
|
||||
|
||||
(defun mode-local-use-bindings-p (this-mode desired-mode)
|
||||
|
@ -567,6 +567,7 @@ appropriate arguments deduced from ARGS.
|
|||
OVERARGS is a list of arguments passed to the override and
|
||||
`NAME-default' function, in place of those deduced from ARGS."
|
||||
(declare (doc-string 3)
|
||||
(indent defun)
|
||||
(debug (&define name lambda-list stringp def-body)))
|
||||
`(eval-and-compile
|
||||
(defun ,name ,args
|
||||
|
@ -595,6 +596,7 @@ DOCSTRING is the documentation string.
|
|||
BODY is the implementation of this function."
|
||||
;; FIXME: Make this obsolete and use cl-defmethod with &context instead.
|
||||
(declare (doc-string 4)
|
||||
(indent defun)
|
||||
(debug (&define name symbolp lambda-list stringp def-body)))
|
||||
(let ((newname (intern (format "%s-%s" name mode))))
|
||||
`(progn
|
||||
|
|
|
@ -391,6 +391,7 @@ etc., found in the semantic-decorate library.
|
|||
To add other kind of decorations on a tag, `NAME-highlight' must use
|
||||
`semantic-decorate-tag', and other functions of the semantic
|
||||
decoration API found in this library."
|
||||
(declare (indent 1))
|
||||
(let ((predicate (semantic-decorate-style-predicate name))
|
||||
(highlighter (semantic-decorate-style-highlighter name))
|
||||
(predicatedef (semantic-decorate-style-predicate-default name))
|
||||
|
|
|
@ -82,6 +82,7 @@ users will customize.
|
|||
|
||||
Creates a customizable variable users can customize that will
|
||||
keep semantic data structures up to date."
|
||||
(declare (indent defun))
|
||||
`(progn
|
||||
;; Create a variable users can customize.
|
||||
(defcustom ,name ,value
|
||||
|
|
|
@ -1165,7 +1165,8 @@ of type `spp-macro-def' is to be created.
|
|||
VALFORM are forms that return the value to be saved for this macro, or nil.
|
||||
When implementing a macro, you can use `semantic-lex-spp-stream-for-macro'
|
||||
to convert text into a lexical stream for storage in the macro."
|
||||
(declare (debug (&define name stringp stringp form def-body)))
|
||||
(declare (debug (&define name stringp stringp form def-body))
|
||||
(indent 1))
|
||||
(let ((start (make-symbol "start"))
|
||||
(end (make-symbol "end"))
|
||||
(val (make-symbol "val"))
|
||||
|
@ -1199,7 +1200,8 @@ REGEXP is a regular expression for the analyzer to match.
|
|||
See `define-lex-regex-analyzer' for more on regexp.
|
||||
TOKIDX is an index into REGEXP for which a new lexical token
|
||||
of type `spp-macro-undef' is to be created."
|
||||
(declare (debug (&define name stringp stringp form)))
|
||||
(declare (debug (&define name stringp stringp form))
|
||||
(indent 1))
|
||||
(let ((start (make-symbol "start"))
|
||||
(end (make-symbol "end")))
|
||||
`(define-lex-regex-analyzer ,name
|
||||
|
@ -1260,7 +1262,8 @@ type of include. The return value should be of the form:
|
|||
(NAME . TYPE)
|
||||
where NAME is the name of the include, and TYPE is the type of the include,
|
||||
where a valid symbol is `system', or nil."
|
||||
(declare (debug (&define name stringp stringp form def-body)))
|
||||
(declare (debug (&define name stringp stringp form def-body))
|
||||
(indent 1))
|
||||
(let ((start (make-symbol "start"))
|
||||
(end (make-symbol "end"))
|
||||
(val (make-symbol "val"))
|
||||
|
|
|
@ -760,7 +760,7 @@ If two analyzers can match the same text, it is important to order the
|
|||
analyzers so that the one you want to match first occurs first. For
|
||||
example, it is good to put a number analyzer in front of a symbol
|
||||
analyzer which might mistake a number for a symbol."
|
||||
(declare (debug (&define name stringp (&rest symbolp))))
|
||||
(declare (debug (&define name stringp (&rest symbolp))) (indent 1))
|
||||
`(defun ,name (start end &optional depth length)
|
||||
,(concat doc "\nSee `semantic-lex' for more information.")
|
||||
;; Make sure the state of block parsing starts over.
|
||||
|
@ -1096,7 +1096,7 @@ Proper action in FORMS is to move the value of `semantic-lex-end-point' to
|
|||
after the location of the analyzed entry, and to add any discovered tokens
|
||||
at the beginning of `semantic-lex-token-stream'.
|
||||
This can be done by using `semantic-lex-push-token'."
|
||||
(declare (debug (&define name stringp form def-body)))
|
||||
(declare (debug (&define name stringp form def-body)) (indent 1))
|
||||
`(eval-and-compile
|
||||
;; This is the real info used by `define-lex' (via semantic-lex-one-token).
|
||||
(defconst ,name '(,condition ,@forms) ,doc)
|
||||
|
@ -1118,7 +1118,7 @@ This can be done by using `semantic-lex-push-token'."
|
|||
"Create a lexical analyzer with NAME and DOC that will match REGEXP.
|
||||
FORMS are evaluated upon a successful match.
|
||||
See `define-lex-analyzer' for more about analyzers."
|
||||
(declare (debug (&define name stringp form def-body)))
|
||||
(declare (debug (&define name stringp form def-body)) (indent 1))
|
||||
`(define-lex-analyzer ,name
|
||||
,doc
|
||||
(looking-at ,regexp)
|
||||
|
@ -1137,7 +1137,8 @@ FORMS are evaluated upon a successful match BEFORE the new token is
|
|||
created. It is valid to ignore FORMS.
|
||||
See `define-lex-analyzer' for more about analyzers."
|
||||
(declare (debug
|
||||
(&define name stringp form symbolp [ &optional form ] def-body)))
|
||||
(&define name stringp form symbolp [ &optional form ] def-body))
|
||||
(indent 1))
|
||||
`(define-lex-analyzer ,name
|
||||
,doc
|
||||
(looking-at ,regexp)
|
||||
|
@ -1162,7 +1163,8 @@ where BLOCK-SYM is the symbol returned in a block token. OPEN-DELIM
|
|||
and CLOSE-DELIM are respectively the open and close delimiters
|
||||
identifying a block. OPEN-SYM and CLOSE-SYM are respectively the
|
||||
symbols returned in open and close tokens."
|
||||
(declare (debug (&define name stringp form (&rest form))))
|
||||
(declare (debug (&define name stringp form (&rest form)))
|
||||
(indent 1))
|
||||
(let ((specs (cons spec1 specs))
|
||||
spec open olist clist)
|
||||
(while specs
|
||||
|
@ -1471,6 +1473,7 @@ syntax as specified by the syntax table."
|
|||
(defmacro define-lex-keyword-type-analyzer (name doc syntax)
|
||||
"Define a keyword type analyzer NAME with DOC string.
|
||||
SYNTAX is the regexp that matches a keyword syntactic expression."
|
||||
(declare (indent 1))
|
||||
(let ((key (make-symbol "key")))
|
||||
`(define-lex-analyzer ,name
|
||||
,doc
|
||||
|
@ -1486,6 +1489,7 @@ SYNTAX is the regexp that matches a keyword syntactic expression."
|
|||
"Define a sexp type analyzer NAME with DOC string.
|
||||
SYNTAX is the regexp that matches the beginning of the s-expression.
|
||||
TOKEN is the lexical token returned when SYNTAX matches."
|
||||
(declare (indent 1))
|
||||
`(define-lex-regex-analyzer ,name
|
||||
,doc
|
||||
,syntax
|
||||
|
@ -1504,6 +1508,7 @@ SYNTAX is the regexp that matches a syntactic expression.
|
|||
MATCHES is an alist of lexical elements used to refine the syntactic
|
||||
expression.
|
||||
DEFAULT is the default lexical token returned when no MATCHES."
|
||||
(declare (indent 1))
|
||||
(if matches
|
||||
(let* ((val (make-symbol "val"))
|
||||
(lst (make-symbol "lst"))
|
||||
|
@ -1536,6 +1541,7 @@ SYNTAX is the regexp that matches a syntactic expression.
|
|||
MATCHES is an alist of lexical elements used to refine the syntactic
|
||||
expression.
|
||||
DEFAULT is the default lexical token returned when no MATCHES."
|
||||
(declare (indent 1))
|
||||
(if matches
|
||||
(let* ((val (make-symbol "val"))
|
||||
(lst (make-symbol "lst"))
|
||||
|
@ -1633,6 +1639,7 @@ When the lexer encounters the open-paren delimiter \"(\":
|
|||
- If the maximum depth of parenthesis tracking is reached (current
|
||||
depth >= max depth), it returns the whole parenthesis block as
|
||||
a (PAREN_BLOCK start . end) token."
|
||||
(declare (indent 1))
|
||||
(let* ((val (make-symbol "val"))
|
||||
(lst (make-symbol "lst"))
|
||||
(elt (make-symbol "elt")))
|
||||
|
|
|
@ -66,7 +66,7 @@ Returned tokens must have the form:
|
|||
(TOKSYM VALUE START . END)
|
||||
|
||||
where VALUE is the buffer substring between START and END positions."
|
||||
(declare (debug (&define name stringp def-body)))
|
||||
(declare (debug (&define name stringp def-body)) (indent 1))
|
||||
`(defun
|
||||
,name () ,doc
|
||||
(cond
|
||||
|
|
|
@ -364,7 +364,8 @@ call that function directly.
|
|||
|
||||
See Info node `(elisp) Customization' in the Emacs Lisp manual
|
||||
for more information."
|
||||
(declare (doc-string 3) (debug (name body)))
|
||||
(declare (doc-string 3) (debug (name body))
|
||||
(indent defun))
|
||||
;; It is better not to use backquote in this file,
|
||||
;; because that makes a bootstrapping problem
|
||||
;; if you need to recompile all the Lisp files using interpreted code.
|
||||
|
@ -447,7 +448,7 @@ In the ATTS property list, possible attributes are `:family',
|
|||
|
||||
See Info node `(elisp) Faces' in the Emacs Lisp manual for more
|
||||
information."
|
||||
(declare (doc-string 3))
|
||||
(declare (doc-string 3) (indent defun))
|
||||
;; It is better not to use backquote in this file,
|
||||
;; because that makes a bootstrapping problem
|
||||
;; if you need to recompile all the Lisp files using interpreted code.
|
||||
|
@ -511,7 +512,7 @@ For a list of valid keywords, see the common keywords listed in
|
|||
|
||||
See Info node `(elisp) Customization' in the Emacs Lisp manual
|
||||
for more information."
|
||||
(declare (doc-string 3))
|
||||
(declare (doc-string 3) (indent defun))
|
||||
;; It is better not to use backquote in this file,
|
||||
;; because that makes a bootstrapping problem
|
||||
;; if you need to recompile all the Lisp files using interpreted code.
|
||||
|
@ -1142,6 +1143,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';
|
||||
see `custom-make-theme-feature' for more information."
|
||||
(declare (doc-string 2)
|
||||
(indent 1)
|
||||
(advertised-calling-convention (theme &optional doc) "22.1"))
|
||||
(let ((feature (custom-make-theme-feature theme)))
|
||||
;; It is better not to use backquote in this file,
|
||||
|
|
|
@ -380,7 +380,7 @@ You don't need this. (See bytecomp.el commentary for more details.)
|
|||
"Define an inline function. The syntax is just like that of `defun'.
|
||||
|
||||
\(fn NAME ARGLIST &optional DOCSTRING DECL &rest BODY)"
|
||||
(declare (debug defun) (doc-string 3))
|
||||
(declare (debug defun) (doc-string 3) (indent 2))
|
||||
(or (memq (get name 'byte-optimizer)
|
||||
'(nil byte-compile-inline-expand))
|
||||
(error "`%s' is a primitive" name))
|
||||
|
@ -434,7 +434,7 @@ WHEN should be a string indicating when the function was first
|
|||
made obsolete, for example a date or a release number.
|
||||
|
||||
See the docstrings of `defalias' and `make-obsolete' for more details."
|
||||
(declare (doc-string 4))
|
||||
(declare (doc-string 4) (indent defun))
|
||||
`(progn
|
||||
(defalias ,obsolete-name ,current-name ,docstring)
|
||||
(make-obsolete ,obsolete-name ,current-name ,when)))
|
||||
|
@ -483,7 +483,7 @@ For the benefit of Customize, if OBSOLETE-NAME has
|
|||
any of the following properties, they are copied to
|
||||
CURRENT-NAME, if it does not already have them:
|
||||
`saved-value', `saved-variable-comment'."
|
||||
(declare (doc-string 4))
|
||||
(declare (doc-string 4) (indent defun))
|
||||
`(progn
|
||||
(defvaralias ,obsolete-name ,current-name ,docstring)
|
||||
;; See Bug#4706.
|
||||
|
|
|
@ -175,12 +175,7 @@ See Info node `(elisp)Derived Modes' for more details.
|
|||
(declare (debug (&define name symbolp sexp [&optional stringp]
|
||||
[&rest keywordp sexp] def-body))
|
||||
(doc-string 4)
|
||||
;; Ask not what
|
||||
;;(indent 3)
|
||||
;; can do for you, ask what it can do to others. IOW, the
|
||||
;; missing of indentation setting here is the indentation
|
||||
;; setting and not an oversight.
|
||||
)
|
||||
(indent defun))
|
||||
|
||||
(when (and docstring (not (stringp docstring)))
|
||||
;; Some trickiness, since what appears to be the docstring may really be
|
||||
|
|
|
@ -198,6 +198,7 @@ INIT-VALUE LIGHTER KEYMAP.
|
|||
|
||||
\(fn MODE DOC [KEYWORD VAL ... &rest BODY])"
|
||||
(declare (doc-string 2)
|
||||
(indent defun)
|
||||
(debug (&define name string-or-null-p
|
||||
[&optional [¬ keywordp] sexp
|
||||
&optional [¬ keywordp] sexp
|
||||
|
@ -450,7 +451,7 @@ after running the major mode's hook. However, MODE is not turned
|
|||
on if the hook has explicitly disabled it.
|
||||
|
||||
\(fn GLOBAL-MODE MODE TURN-ON [KEY VALUE]... BODY...)"
|
||||
(declare (doc-string 2))
|
||||
(declare (doc-string 2) (indent defun))
|
||||
(let* ((global-mode-name (symbol-name global-mode))
|
||||
(mode-name (symbol-name mode))
|
||||
(pretty-name (easy-mmode-pretty-mode-name mode))
|
||||
|
|
|
@ -70,7 +70,8 @@ is appropriate to use. Uses `defmethod' to create methods, and calls
|
|||
`defgeneric' for you. With this implementation the ARGS are
|
||||
currently ignored. You can use `defgeneric' to apply specialized
|
||||
top level documentation to a method."
|
||||
(declare (doc-string 3) (obsolete cl-defgeneric "25.1"))
|
||||
(declare (doc-string 3) (obsolete cl-defgeneric "25.1")
|
||||
(indent defun))
|
||||
`(eieio--defalias ',method
|
||||
(eieio--defgeneric-init-form
|
||||
',method
|
||||
|
@ -103,6 +104,7 @@ Summary:
|
|||
\"doc-string\"
|
||||
body)"
|
||||
(declare (doc-string 3) (obsolete cl-defmethod "25.1")
|
||||
(indent defun)
|
||||
(debug
|
||||
(&define ; this means we are defining something
|
||||
[&name sexp] ;Allow (setf ...) additionally to symbols.
|
||||
|
|
|
@ -110,7 +110,7 @@ Options in CLOS not supported in EIEIO:
|
|||
|
||||
Due to the way class options are set up, you can add any tags you wish,
|
||||
and reference them using the function `class-option'."
|
||||
(declare (doc-string 4))
|
||||
(declare (doc-string 4) (indent defun))
|
||||
(cl-check-type superclasses list)
|
||||
|
||||
(cond ((and (stringp (car options-and-doc))
|
||||
|
|
|
@ -71,6 +71,7 @@ string, it'll be inserted as is, then the string will be `read',
|
|||
and then evaluated.
|
||||
|
||||
There can be any number of :example/:result elements."
|
||||
(declare (indent defun))
|
||||
`(progn
|
||||
(setq shortdoc--groups (delq (assq ',group shortdoc--groups)
|
||||
shortdoc--groups))
|
||||
|
|
|
@ -1291,7 +1291,7 @@ Example:
|
|||
#\\='erc-replace-insert))
|
||||
((remove-hook \\='erc-insert-modify-hook
|
||||
#\\='erc-replace-insert)))"
|
||||
(declare (doc-string 3))
|
||||
(declare (doc-string 3) (indent defun))
|
||||
(let* ((sn (symbol-name name))
|
||||
(mode (intern (format "erc-%s-mode" (downcase sn))))
|
||||
(group (intern (format "erc-%s" (downcase sn))))
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
(defmacro defezimage (variable imagespec docstring)
|
||||
"Define VARIABLE as an image if `defimage' is not available.
|
||||
IMAGESPEC is the image data, and DOCSTRING is documentation for the image."
|
||||
(declare (indent defun))
|
||||
`(progn
|
||||
(defimage ,variable ,imagespec ,docstring)
|
||||
(put (quote ,variable) 'ezimage t)))
|
||||
|
|
|
@ -239,6 +239,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST."
|
|||
"Create function NAME.
|
||||
If FUNCTION exists, then NAME becomes an alias for FUNCTION.
|
||||
Otherwise, create function NAME with ARG-LIST and BODY."
|
||||
(declare (indent defun))
|
||||
(let ((defined-p (fboundp function)))
|
||||
(if defined-p
|
||||
`(defalias ',name ',function)
|
||||
|
|
|
@ -791,7 +791,7 @@ Example:
|
|||
|
||||
(defimage test-image ((:type xpm :file \"~/test1.xpm\")
|
||||
(:type xbm :file \"~/test1.xbm\")))"
|
||||
(declare (doc-string 3))
|
||||
(declare (doc-string 3) (indent defun))
|
||||
`(defvar ,symbol (find-image ',specs) ,doc))
|
||||
|
||||
|
||||
|
|
|
@ -1553,7 +1553,7 @@ MAP :=
|
|||
MAP-IDs := MAP-ID ...
|
||||
MAP-SET := MAP-IDs | (MAP-IDs) MAP-SET
|
||||
MAP-ID := integer"
|
||||
(declare (doc-string 3))
|
||||
(declare (doc-string 3) (indent defun))
|
||||
`(let ((prog ,(unwind-protect
|
||||
(progn
|
||||
;; To make ,(charset-id CHARSET) works well.
|
||||
|
|
|
@ -148,6 +148,7 @@
|
|||
(defmacro define-iso-single-byte-charset (symbol iso-symbol name nickname
|
||||
iso-ir iso-final
|
||||
emacs-mule-id map)
|
||||
(declare (indent defun))
|
||||
`(progn
|
||||
(define-charset ,symbol
|
||||
,name
|
||||
|
|
|
@ -37,6 +37,7 @@ a string and return a digest of it (in binary form).
|
|||
B is a byte length of a block size of H. (B=64 for both SHA1 and MD5.)
|
||||
L is a byte length of hash outputs. (L=16 for MD5, L=20 for SHA1.)
|
||||
If BIT is non-nil, truncate output to specified bits."
|
||||
(declare (indent defun))
|
||||
`(defun ,name (text key)
|
||||
,(concat "Compute "
|
||||
(upcase (symbol-name name))
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
;;; Keyword routines not supported by new package.
|
||||
|
||||
(defmacro defkeyword (x &optional doc)
|
||||
(declare (indent defun))
|
||||
(cl-list* 'defconst x (list 'quote x) (and doc (list doc))))
|
||||
|
||||
(defun keyword-of (sym)
|
||||
|
|
|
@ -513,7 +513,8 @@ a temporary-variables list, a value-forms list, a store-variables list
|
|||
See `gv-define-expander', and `gv-define-setter' for better and
|
||||
simpler ways to define setf-methods."
|
||||
(declare (debug
|
||||
(&define name cl-lambda-list cl-declarations-or-string def-body)))
|
||||
(&define name cl-lambda-list cl-declarations-or-string def-body))
|
||||
(indent defun))
|
||||
`(progn
|
||||
,@(if (stringp (car body))
|
||||
(list `(put ',name 'setf-documentation ,(pop body))))
|
||||
|
@ -554,7 +555,8 @@ You can replace this form with `gv-define-setter'.
|
|||
(&define name
|
||||
[&or [symbolp &optional stringp]
|
||||
[cl-lambda-list (symbolp)]]
|
||||
cl-declarations-or-string def-body)))
|
||||
cl-declarations-or-string def-body))
|
||||
(indent defun))
|
||||
(if (and (listp arg1) (consp args))
|
||||
;; Like `gv-define-setter' but with `cl-function'.
|
||||
`(gv-define-expander ,name
|
||||
|
@ -615,7 +617,8 @@ arguments from ARGLIST using FUNC. For example:
|
|||
You can replace this macro with `gv-letplace'."
|
||||
(declare (debug
|
||||
(&define name cl-lambda-list ;; should exclude &key
|
||||
symbolp &optional stringp)))
|
||||
symbolp &optional stringp))
|
||||
(indent defun))
|
||||
(if (memq '&key arglist)
|
||||
(error "&key not allowed in define-modify-macro"))
|
||||
(require 'cl-macs) ;For cl--arglist-args.
|
||||
|
|
|
@ -179,7 +179,7 @@ STYLE stands for the choice where the value is taken from some
|
|||
style setting. PREAMBLE is optionally prepended to FOO; that is,
|
||||
if FOO contains :tag or :value, the respective two-element list
|
||||
component is ignored."
|
||||
(declare (debug (symbolp form stringp &rest)))
|
||||
(declare (debug (symbolp form stringp &rest)) (indent defun))
|
||||
(let* ((expanded-doc (concat doc "
|
||||
|
||||
This is a style variable. Apart from the valid values described
|
||||
|
|
|
@ -2227,6 +2227,7 @@ The parent is always `compilation-mode' and the customizable `compilation-...'
|
|||
variables are also set from the name of the mode you have chosen,
|
||||
by replacing the first word, e.g., `compilation-scroll-output' from
|
||||
`grep-scroll-output' if that variable exists."
|
||||
(declare (indent defun))
|
||||
(let ((mode-name (replace-regexp-in-string "-mode\\'" "" (symbol-name mode))))
|
||||
`(define-derived-mode ,mode compilation-mode ,name
|
||||
,doc
|
||||
|
|
|
@ -1612,6 +1612,7 @@ this trigger is subscribed to `gdb-buf-publisher' and called with
|
|||
;; Used to display windows with thread-bound buffers
|
||||
(defmacro def-gdb-preempt-display-buffer (name buffer &optional doc
|
||||
split-horizontal)
|
||||
(declare (indent defun))
|
||||
`(defun ,name (&optional thread)
|
||||
,(when doc doc)
|
||||
(message "%s" thread)
|
||||
|
@ -3012,6 +3013,7 @@ calling `gdb-current-context-command').
|
|||
Triggers defined by this command are meant to be used as a
|
||||
trigger argument when describing buffer types with
|
||||
`gdb-set-buffer-rules'."
|
||||
(declare (indent defun))
|
||||
`(defun ,trigger-name (&optional signal)
|
||||
(when
|
||||
(or (not ,signal-list)
|
||||
|
@ -3032,6 +3034,7 @@ Erase current buffer and evaluate CUSTOM-DEFUN.
|
|||
Then call `gdb-update-buffer-name'.
|
||||
|
||||
If NOPRESERVE is non-nil, window point is not restored after CUSTOM-DEFUN."
|
||||
(declare (indent defun))
|
||||
`(defun ,handler-name ()
|
||||
(let* ((inhibit-read-only t)
|
||||
,@(unless nopreserve
|
||||
|
@ -3055,6 +3058,7 @@ See `def-gdb-auto-update-trigger'.
|
|||
|
||||
HANDLER-NAME handler uses customization of CUSTOM-DEFUN.
|
||||
See `def-gdb-auto-update-handler'."
|
||||
(declare (indent defun))
|
||||
`(progn
|
||||
(def-gdb-auto-update-trigger ,trigger-name
|
||||
,gdb-command
|
||||
|
@ -3473,6 +3477,7 @@ corresponding to the mode line clicked."
|
|||
CUSTOM-DEFUN may use locally bound `thread' variable, which will
|
||||
be the value of `gdb-thread' property of the current line.
|
||||
If `gdb-thread' is nil, error is signaled."
|
||||
(declare (indent defun))
|
||||
`(defun ,name (&optional event)
|
||||
,(when doc doc)
|
||||
(interactive (list last-input-event))
|
||||
|
@ -3488,6 +3493,7 @@ If `gdb-thread' is nil, error is signaled."
|
|||
&optional doc)
|
||||
"Define a NAME which will call BUFFER-COMMAND with id of thread
|
||||
on the current line."
|
||||
(declare (indent defun))
|
||||
`(def-gdb-thread-buffer-command ,name
|
||||
(,buffer-command (gdb-mi--field thread 'id))
|
||||
,doc))
|
||||
|
@ -3543,6 +3549,7 @@ on the current line."
|
|||
"Define a NAME which will execute GUD-COMMAND with
|
||||
`gdb-thread-number' locally bound to id of thread on the current
|
||||
line."
|
||||
(declare (indent defun))
|
||||
`(def-gdb-thread-buffer-command ,name
|
||||
(if gdb-non-stop
|
||||
(let ((gdb-thread-number (gdb-mi--field thread 'id))
|
||||
|
@ -3711,6 +3718,7 @@ in `gdb-memory-format'."
|
|||
|
||||
(defmacro def-gdb-set-positive-number (name variable echo-string &optional doc)
|
||||
"Define a function NAME which reads new VAR value from minibuffer."
|
||||
(declare (indent defun))
|
||||
`(defun ,name (event)
|
||||
,(when doc doc)
|
||||
(interactive "e")
|
||||
|
@ -3739,6 +3747,7 @@ in `gdb-memory-format'."
|
|||
"Define a function NAME to switch memory buffer to use FORMAT.
|
||||
|
||||
DOC is an optional documentation string."
|
||||
(declare (indent defun))
|
||||
`(defun ,name () ,(when doc doc)
|
||||
(interactive)
|
||||
(customize-set-variable 'gdb-memory-format ,format)
|
||||
|
@ -3808,6 +3817,7 @@ DOC is an optional documentation string."
|
|||
"Define a function NAME to switch memory unit size to UNIT-SIZE.
|
||||
|
||||
DOC is an optional documentation string."
|
||||
(declare (indent defun))
|
||||
`(defun ,name () ,(when doc doc)
|
||||
(interactive)
|
||||
(customize-set-variable 'gdb-memory-unit ,unit-size)
|
||||
|
@ -3832,6 +3842,7 @@ The defined function switches Memory buffer to show address
|
|||
stored in ADDRESS-VAR variable.
|
||||
|
||||
DOC is an optional documentation string."
|
||||
(declare (indent defun))
|
||||
`(defun ,name
|
||||
,(when doc doc)
|
||||
(interactive)
|
||||
|
|
|
@ -3539,8 +3539,8 @@ Treats actions as defuns."
|
|||
#'gdb-script-end-of-defun)
|
||||
(setq-local font-lock-defaults
|
||||
'(gdb-script-font-lock-keywords nil nil ((?_ . "w")) nil
|
||||
(font-lock-syntactic-face-function
|
||||
. gdb-script-font-lock-syntactic-face)))
|
||||
(font-lock-syntactic-face-function
|
||||
. gdb-script-font-lock-syntactic-face)))
|
||||
;; Recognize docstrings.
|
||||
(setq-local syntax-propertize-function
|
||||
gdb-script-syntax-propertize-function)
|
||||
|
|
|
@ -9859,6 +9859,7 @@ does not have any effect until this variable is set.
|
|||
CUSTOMIZATIONS, if non-nil, should be composed of alternating
|
||||
`defcustom' keywords and values to add to the declaration of
|
||||
`COMMAND-alternatives' (typically :group and :version)."
|
||||
(declare (indent defun))
|
||||
(let* ((command-name (symbol-name command))
|
||||
(varalt-name (concat command-name "-alternatives"))
|
||||
(varalt-sym (intern varalt-name))
|
||||
|
|
|
@ -113,7 +113,8 @@ are integer buffer positions in the reverse order of the insertion order.")
|
|||
"Define a user-configurable COMMAND that enters a statement skeleton.
|
||||
DOCUMENTATION is that of the command.
|
||||
SKELETON is as defined under `skeleton-insert'."
|
||||
(declare (doc-string 2) (debug (&define name stringp skeleton-edebug-spec)))
|
||||
(declare (doc-string 2) (debug (&define name stringp skeleton-edebug-spec))
|
||||
(indent defun))
|
||||
(if skeleton-debug
|
||||
(set command skeleton))
|
||||
`(progn
|
||||
|
|
|
@ -193,7 +193,7 @@ set earlier in the `setq-local'. The return value of the
|
|||
"Define VAR as a buffer-local variable with default value VAL.
|
||||
Like `defvar' but additionally marks the variable as being automatically
|
||||
buffer-local wherever it is set."
|
||||
(declare (debug defvar) (doc-string 3))
|
||||
(declare (debug defvar) (doc-string 3) (indent 2))
|
||||
;; Can't use backquote here, it's too early in the bootstrap.
|
||||
(list 'progn (list 'defvar var val docstring)
|
||||
(list 'make-variable-buffer-local (list 'quote var))))
|
||||
|
@ -6551,6 +6551,7 @@ macro also accepts a `:doc' keyword, which (if present) is used
|
|||
as the variable documentation string.
|
||||
|
||||
\(fn VARIABLE-NAME &key DOC FULL PARENT SUPPRESS NAME PREFIX KEYMAP &rest [KEY DEFINITION]...)"
|
||||
(declare (indent 1))
|
||||
(let ((opts nil)
|
||||
doc)
|
||||
(while (and defs
|
||||
|
|
|
@ -758,6 +758,7 @@ clear what alternative to use.
|
|||
- `DOUBLE' is the generic case."
|
||||
(declare (debug (&define sexp lambda-list stringp
|
||||
("interactive" interactive) def-body))
|
||||
(indent defun)
|
||||
(doc-string 3))
|
||||
(let ((style (cvs-cdr fun))
|
||||
(fun (cvs-car fun)))
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
;; (list 'or (list 'boundp (list 'car 'keywords))
|
||||
;; (list 'set (list 'car 'keywords) (list 'car 'keywords)))
|
||||
;; (list 'setq 'keywords (list 'cdr 'keywords)))))
|
||||
(declare (obsolete nil "27.1"))
|
||||
(declare (obsolete nil "27.1") (indent defun))
|
||||
nil)
|
||||
|
||||
;;(define-widget-keywords :documentation-indent
|
||||
|
|
Loading…
Add table
Reference in a new issue