[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 43f59b9 1/2: Mark all def* functions that should indent as `defun
From: |
Lars Ingebrigtsen |
Subject: |
master 43f59b9 1/2: Mark all def* functions that should indent as `defun' |
Date: |
Wed, 13 Oct 2021 15:53:06 -0400 (EDT) |
branch: master
commit 43f59b91aa2bc5e1771ed68e9a3a84b4aef26ef4
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Mark all def* functions that should indent as `defun'
* lisp/abbrev.el (define-abbrev):
(define-abbrev-table): Mark all functions that have names that
start with "def" that should indent according to the current
heuristics (bug#43329).
* lisp/autoinsert.el (define-auto-insert):
* lisp/button.el (define-button-type):
* lisp/subr.el (define-key-after):
(define-mail-user-agent):
(define-keymap):
* lisp/widget.el (define-widget):
* lisp/emacs-lisp/package.el (define-package):
* lisp/international/mule-cmds.el (define-char-code-property):
* lisp/international/mule.el (define-charset):
(define-coding-system):
(define-translation-table):
(define-translation-hash-table):
---
lisp/abbrev.el | 3 ++-
lisp/autoinsert.el | 1 +
lisp/button.el | 1 +
lisp/emacs-lisp/package.el | 1 +
lisp/international/mule-cmds.el | 1 +
lisp/international/mule.el | 4 ++++
lisp/subr.el | 3 +++
lisp/widget.el | 2 +-
8 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index b0e8a4f..d3daf63 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -583,6 +583,7 @@ PROPS is a property list. The following properties are
special:
An obsolete but still supported calling form is:
\(define-abbrev TABLE NAME EXPANSION &optional HOOK COUNT SYSTEM)."
+ (declare (indent defun))
(when (and (consp props) (or (null (car props)) (numberp (car props))))
;; Old-style calling convention.
(setq props `(:count ,(car props)
@@ -1139,7 +1140,7 @@ Properties with special meaning:
- `:enable-function' can be set to a function of no argument which returns
non-nil if and only if the abbrevs in this table should be used for this
instance of `expand-abbrev'."
- (declare (doc-string 3))
+ (declare (doc-string 3) (indent defun))
;; We used to manually add the docstring, but we also want to record this
;; location as the definition of the variable (in load-history), so we may
;; as well just use `defvar'.
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index 063d0a1..b448c0f 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -415,6 +415,7 @@ Matches the visited file name against the elements of
`auto-insert-alist'."
"Associate CONDITION with (additional) ACTION in `auto-insert-alist'.
Optional AFTER means to insert action after all existing actions for CONDITION,
or if CONDITION had no actions, after all other CONDITIONs."
+ (declare (indent defun))
(let ((elt (assoc condition auto-insert-alist)))
(if elt
(setcdr elt
diff --git a/lisp/button.el b/lisp/button.el
index aedd07b..acf7646 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -130,6 +130,7 @@ In addition, the keyword argument :supertype may be used to
specify a
`button-type' from which NAME inherits its default property values
(however, the inheritance happens only when NAME is defined; subsequent
changes to a supertype are not reflected in its subtypes)."
+ (declare (indent defun))
(let ((catsym (make-symbol (concat (symbol-name name) "-button")))
(super-catsym
(button-category-symbol
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 5445fa9..40318dc 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -714,6 +714,7 @@ REQUIREMENTS is a list of dependencies on other packages.
where OTHER-VERSION is a string.
EXTRA-PROPERTIES is currently unused."
+ (declare (indent defun))
;; FIXME: Placeholder! Should we keep it?
(error "Don't call me!"))
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index a0a6557..94d2f82 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2927,6 +2927,7 @@ Optional 3rd argument DOCSTRING is a documentation string
of the property.
See also the documentation of `get-char-code-property' and
`put-char-code-property'."
+ (declare (indent defun))
(or (symbolp name)
(error "Not a symbol: %s" name))
(if (char-table-p table)
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 5022a17..3e45a64 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -218,6 +218,7 @@ corresponding Unicode character code.
If it is a string, it is a name of file that contains the above
information. The file format is the same as what described for `:map'
attribute."
+ (declare (indent defun))
(when (vectorp (car props))
;; Old style code:
;; (define-charset CHARSET-ID CHARSET-SYMBOL INFO-VECTOR)
@@ -890,6 +891,7 @@ non-nil.
VALUE non-nil means Emacs prefers UTF-8 on code detection for
non-ASCII files. This attribute is meaningful only when
`:coding-type' is `undecided'."
+ (declare (indent defun))
(let* ((common-attrs (mapcar 'list
'(:mnemonic
:coding-type
@@ -2320,6 +2322,7 @@ This function sets properties `translation-table' and
`translation-table-id' of SYMBOL to the created table itself and the
identification number of the table respectively. It also registers
the table in `translation-table-vector'."
+ (declare (indent defun))
(let ((table (if (and (char-table-p (car args))
(eq (char-table-subtype (car args))
'translation-table))
@@ -2394,6 +2397,7 @@ Value is what BODY returns."
Analogous to `define-translation-table', but updates
`translation-hash-table-vector' and the table is for use in the CCL
`lookup-integer' and `lookup-character' functions."
+ (declare (indent defun))
(unless (and (symbolp symbol)
(hash-table-p table))
(error "Bad args to define-translation-hash-table"))
diff --git a/lisp/subr.el b/lisp/subr.el
index 805c14e..46cd4c1 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1000,6 +1000,7 @@ Bindings are always added before any inherited map.
The order of bindings in a keymap matters only when it is used as
a menu, so this function is not useful for non-menu keymaps."
+ (declare (indent defun))
(unless after (setq after t))
(or (keymapp keymap)
(signal 'wrong-type-argument (list 'keymapp keymap)))
@@ -5572,6 +5573,7 @@ If HOOKVAR is nil, `mail-send-hook' is used.
The properties used on SYMBOL are `composefunc', `sendfunc',
`abortfunc', and `hookvar'."
+ (declare (indent defun))
(put symbol 'composefunc composefunc)
(put symbol 'sendfunc sendfunc)
(put symbol 'abortfunc (or abortfunc #'kill-buffer))
@@ -6491,6 +6493,7 @@ also be the special symbol `:menu', in which case
DEFINITION
should be a MENU form as accepted by `easy-menu-define'.
\(fn &key FULL PARENT SUPPRESS NAME PREFIX KEYMAP &rest [KEY DEFINITION]...)"
+ (declare (indent defun))
(define-keymap--define definitions))
(defun define-keymap--define (definitions)
diff --git a/lisp/widget.el b/lisp/widget.el
index 393fe6c..0d19771 100644
--- a/lisp/widget.el
+++ b/lisp/widget.el
@@ -83,7 +83,7 @@ create identical widgets:
* (apply #\\='widget-create CLASS ARGS)
The third argument DOC is a documentation string for the widget."
- (declare (doc-string 3))
+ (declare (doc-string 3) (indent defun))
;;
(unless (or (null doc) (stringp doc))
(error "Widget documentation must be nil or a string"))