1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; More stylistic docfixes in emacs-lisp/*.el found by checkdoc

This commit is contained in:
Stefan Kangas 2021-09-18 13:12:41 +02:00
parent 11d6d6c3ea
commit dd1220b969
20 changed files with 37 additions and 37 deletions

View file

@ -1033,7 +1033,7 @@
;; ;;
;; To make sure a certain piece of advice gets executed even if some error or ;; To make sure a certain piece of advice gets executed even if some error or
;; non-local exit occurred in any preceding code, we can protect it by using ;; non-local exit occurred in any preceding code, we can protect it by using
;; the `protect' keyword. (if any of the around advices is protected then the ;; the `protect' keyword (if any of the around advices is protected then the
;; whole around advice onion will be protected): ;; whole around advice onion will be protected):
;; ;;
;; (defadvice foo (after fg-cleanup prot act) ;; (defadvice foo (after fg-cleanup prot act)
@ -3105,7 +3105,7 @@ The syntax of `defadvice' is as follows:
FUNCTION ::= Name of the function to be advised. FUNCTION ::= Name of the function to be advised.
CLASS ::= `before' | `around' | `after' | `activation' | `deactivation'. CLASS ::= `before' | `around' | `after' | `activation' | `deactivation'.
NAME ::= Non-nil symbol that names this piece of advice. NAME ::= Non-nil symbol that names this piece of advice.
POSITION ::= `first' | `last' | NUMBER. Optional, defaults to `first', POSITION ::= `first' | `last' | NUMBER. Optional, defaults to `first',
see also `ad-add-advice'. see also `ad-add-advice'.
ARGLIST ::= An optional argument list to be used for the advised function ARGLIST ::= An optional argument list to be used for the advised function
instead of the argument list of the original. The first one found in instead of the argument list of the original. The first one found in

View file

@ -25,7 +25,7 @@
;; This code helps GNU Emacs maintainers keep the loaddefs.el file up to ;; This code helps GNU Emacs maintainers keep the loaddefs.el file up to
;; date. It interprets magic cookies of the form ";;;###autoload" in ;; date. It interprets magic cookies of the form ";;;###autoload" in
;; lisp source files in various useful ways. To learn more, read the ;; Lisp source files in various useful ways. To learn more, read the
;; source; if you're going to use this, you'd better be able to. ;; source; if you're going to use this, you'd better be able to.
;;; Code: ;;; Code:
@ -432,8 +432,8 @@ FILE's name."
file) file)
(defun autoload-insert-section-header (outbuf autoloads load-name file time) (defun autoload-insert-section-header (outbuf autoloads load-name file time)
"Insert the section-header line, "Insert the section-header line.
which lists the file name and which functions are in it, etc." This lists the file name and which functions are in it, etc."
;; (cl-assert ;Make sure we don't insert it in the middle of another section. ;; (cl-assert ;Make sure we don't insert it in the middle of another section.
;; (save-excursion ;; (save-excursion
;; (or (not (re-search-backward ;; (or (not (re-search-backward

View file

@ -868,7 +868,7 @@ commands.
\\{backtrace-mode-map} \\{backtrace-mode-map}
A mode which inherits from Backtrace mode, or a command which A mode which inherits from Backtrace mode, or a command which
creates a backtrace-mode buffer, should usually do the following: creates a `backtrace-mode' buffer, should usually do the following:
- Set `backtrace-revert-hook', if the buffer contents need - Set `backtrace-revert-hook', if the buffer contents need
to be specially recomputed prior to `revert-buffer'. to be specially recomputed prior to `revert-buffer'.

View file

@ -202,7 +202,7 @@
(intern (substring (symbol-name arg) 5)) (intern (substring (symbol-name arg) 5))
arg) arg)
(if (integerp (setq c (car arg))) (if (integerp (setq c (car arg)))
(error "non-symbolic byte-op %s" c)) (error "Non-symbolic byte-op %s" c))
(if (eq c 'TAG) (if (eq c 'TAG)
(setq c arg) (setq c arg)
(setq a (cond ((memq c byte-goto-ops) (setq a (cond ((memq c byte-goto-ops)
@ -1753,7 +1753,7 @@ See Info node `(elisp) Integer Basics'."
(setq tags (delq tmp tags)) (setq tags (delq tmp tags))
(setq rest (cdr rest)))) (setq rest (cdr rest))))
(setq rest (cdr rest)))) (setq rest (cdr rest))))
(if tags (error "optimizer error: missed tags %s" tags)) (if tags (error "Optimizer error: missed tags %s" tags))
;; Remove addrs, lap = ( [ (op . arg) | (TAG tagno) ]* ) ;; Remove addrs, lap = ( [ (op . arg) | (TAG tagno) ]* )
(mapcar (lambda (elt) (mapcar (lambda (elt)
(if (numberp elt) (if (numberp elt)

View file

@ -529,11 +529,11 @@ is enabled."
(list 'quote (eval (cons 'progn body) lexical-binding))) (list 'quote (eval (cons 'progn body) lexical-binding)))
(defmacro eval-and-compile (&rest body) (defmacro eval-and-compile (&rest body)
"Like `progn', but evaluates the body at compile time and at "Like `progn', but evaluates the body at compile time and at load time.
load time. In interpreted code, this is entirely equivalent to In interpreted code, this is entirely equivalent to `progn',
`progn', except that the value of the expression may be (but is except that the value of the expression may be (but is not
not necessarily) computed at load time if eager macro expansion necessarily) computed at load time if eager macro expansion is
is enabled." enabled."
(declare (debug (&rest def-form)) (indent 0)) (declare (debug (&rest def-form)) (indent 0))
;; When the byte-compiler expands code, this macro is not used, so we're ;; When the byte-compiler expands code, this macro is not used, so we're
;; either about to run `body' (plain interpretation) or we're doing eager ;; either about to run `body' (plain interpretation) or we're doing eager

View file

@ -915,7 +915,7 @@ CONST2 may be evaluated multiple times."
,bytes ,pc)) ,bytes ,pc))
(defun byte-compile-lapcode (lap) (defun byte-compile-lapcode (lap)
"Turns lapcode into bytecode. The lapcode is destroyed." "Turn lapcode into bytecode. The lapcode is destroyed."
;; Lapcode modifications: changes the ID of a tag to be the tag's PC. ;; Lapcode modifications: changes the ID of a tag to be the tag's PC.
(let ((pc 0) ; Program counter (let ((pc 0) ; Program counter
op off ; Operation & offset op off ; Operation & offset
@ -1899,7 +1899,7 @@ also be compiled."
"Non-nil to prevent byte-compiling of Emacs Lisp code. "Non-nil to prevent byte-compiling of Emacs Lisp code.
This is normally set in local file variables at the end of the elisp file: This is normally set in local file variables at the end of the elisp file:
\;; Local Variables:\n;; no-byte-compile: t\n;; End: ") ;Backslash for compile-main. \;; Local Variables:\n;; no-byte-compile: t\n;; End:") ;Backslash for compile-main.
;;;###autoload(put 'no-byte-compile 'safe-local-variable 'booleanp) ;;;###autoload(put 'no-byte-compile 'safe-local-variable 'booleanp)
(defun byte-recompile-file (filename &optional force arg load) (defun byte-recompile-file (filename &optional force arg load)

View file

@ -2081,7 +2081,7 @@ If the offending word is in a piece of quoted text, then it is skipped."
(not (thing-at-point-looking-at (not (thing-at-point-looking-at
help-xref-url-regexp))) help-xref-url-regexp)))
(if (checkdoc-autofix-ask-replace (if (checkdoc-autofix-ask-replace
b e (format "Text %s should be capitalized. Fix? " b e (format "Text %s should be capitalized. Fix?"
text) text)
(capitalize text) t) (capitalize text) t)
nil nil

View file

@ -960,7 +960,7 @@ Can only be used from within the lexical body of a primary or around method."
;;; Add support for describe-function ;;; Add support for describe-function
(defun cl--generic-search-method (met-name) (defun cl--generic-search-method (met-name)
"For `find-function-regexp-alist'. Searches for a cl-defmethod. "For `find-function-regexp-alist'. Search for a `cl-defmethod'.
MET-NAME is as returned by `cl--generic-load-hist-format'." MET-NAME is as returned by `cl--generic-load-hist-format'."
(let ((base-re (concat "(\\(?:cl-\\)?defmethod[ \t]+" (let ((base-re (concat "(\\(?:cl-\\)?defmethod[ \t]+"
(regexp-quote (format "%s" (car met-name))) (regexp-quote (format "%s" (car met-name)))

View file

@ -3804,7 +3804,7 @@ Return the trampoline if found or nil otherwise."
;;;###autoload ;;;###autoload
(defun comp-clean-up-stale-eln (file) (defun comp-clean-up-stale-eln (file)
"Given FILE remove all its *.eln files in `native-comp-eln-load-path' "Given FILE remove all its *.eln files in `native-comp-eln-load-path'.
sharing the original source filename (including FILE)." sharing the original source filename (including FILE)."
(when (string-match (rx "-" (group-n 1 (1+ hex)) "-" (1+ hex) ".eln" eos) (when (string-match (rx "-" (group-n 1 (1+ hex)) "-" (1+ hex) ".eln" eos)
file) file)

View file

@ -119,7 +119,7 @@ This is to optimize `debugger-make-xrefs'.")
(defvar debugger-jumping-flag nil (defvar debugger-jumping-flag nil
"Non-nil means that `debug-on-entry' is disabled. "Non-nil means that `debug-on-entry' is disabled.
This variable is used by `debugger-jump', `debugger-step-through', This variable is used by `debugger-jump', `debugger-step-through',
and `debugger-reenable' to temporarily disable debug-on-entry.") and `debugger-reenable' to temporarily disable `debug-on-entry'.")
(defvar inhibit-trace) ;Not yet implemented. (defvar inhibit-trace) ;Not yet implemented.
@ -128,7 +128,7 @@ and `debugger-reenable' to temporarily disable debug-on-entry.")
It is a list expected to take the form (CAUSE . REST) It is a list expected to take the form (CAUSE . REST)
where CAUSE can be: where CAUSE can be:
- debug: called for entry to a flagged function. - debug: called for entry to a flagged function.
- t: called because of debug-on-next-call. - t: called because of `debug-on-next-call'.
- lambda: same thing but via `funcall'. - lambda: same thing but via `funcall'.
- exit: called because of exit of a flagged function. - exit: called because of exit of a flagged function.
- error: called because of `debug-on-error'.") - error: called because of `debug-on-error'.")
@ -335,7 +335,7 @@ Make functions into cross-reference buttons if DO-XREFS is non-nil."
(defun debugger-setup-buffer (args) (defun debugger-setup-buffer (args)
"Initialize the `*Backtrace*' buffer for entry to the debugger. "Initialize the `*Backtrace*' buffer for entry to the debugger.
That buffer should be current already and in debugger-mode." That buffer should be current already and in `debugger-mode'."
(setq backtrace-frames (nthcdr (setq backtrace-frames (nthcdr
;; Remove debug--implement-debug-on-entry and the ;; Remove debug--implement-debug-on-entry and the
;; advice's `apply' frame. ;; advice's `apply' frame.
@ -454,7 +454,7 @@ will be used, such as in a debug on exit from a frame."
(exit-recursive-edit)) (exit-recursive-edit))
(defun debugger-jump () (defun debugger-jump ()
"Continue to exit from this frame, with all debug-on-entry suspended." "Continue to exit from this frame, with all `debug-on-entry' suspended."
(interactive) (interactive)
(debugger-frame) (debugger-frame)
(setq debugger-jumping-flag t) (setq debugger-jumping-flag t)
@ -464,7 +464,7 @@ will be used, such as in a debug on exit from a frame."
(exit-recursive-edit)) (exit-recursive-edit))
(defun debugger-reenable () (defun debugger-reenable ()
"Turn all debug-on-entry functions back on. "Turn all `debug-on-entry' functions back on.
This function is put on `post-command-hook' by `debugger-jump' and This function is put on `post-command-hook' by `debugger-jump' and
removes itself from that hook." removes itself from that hook."
(setq debugger-jumping-flag nil) (setq debugger-jumping-flag nil)
@ -695,7 +695,7 @@ Redefining FUNCTION also cancels it."
;;;###autoload ;;;###autoload
(defun cancel-debug-on-entry (&optional function) (defun cancel-debug-on-entry (&optional function)
"Undo effect of \\[debug-on-entry] on FUNCTION. "Undo effect of \\[debug-on-entry] on FUNCTION.
If FUNCTION is nil, cancel debug-on-entry for all functions. If FUNCTION is nil, cancel `debug-on-entry' for all functions.
When called interactively, prompt for FUNCTION in the minibuffer. When called interactively, prompt for FUNCTION in the minibuffer.
To specify a nil argument interactively, exit with an empty minibuffer." To specify a nil argument interactively, exit with an empty minibuffer."
(interactive (interactive
@ -798,7 +798,7 @@ another symbol also cancels it."
;;;###autoload ;;;###autoload
(defun cancel-debug-on-variable-change (&optional variable) (defun cancel-debug-on-variable-change (&optional variable)
"Undo effect of \\[debug-on-variable-change] on VARIABLE. "Undo effect of \\[debug-on-variable-change] on VARIABLE.
If VARIABLE is nil, cancel debug-on-variable-change for all variables. If VARIABLE is nil, cancel `debug-on-variable-change' for all variables.
When called interactively, prompt for VARIABLE in the minibuffer. When called interactively, prompt for VARIABLE in the minibuffer.
To specify a nil argument interactively, exit with an empty minibuffer." To specify a nil argument interactively, exit with an empty minibuffer."
(interactive (interactive

View file

@ -139,7 +139,7 @@ KEYWORD-ARGS:
A nil value means to simply use the same abbrev-table A nil value means to simply use the same abbrev-table
as the parent. as the parent.
:after-hook FORM :after-hook FORM
A single lisp form which is evaluated after the mode A single Lisp form which is evaluated after the mode
hooks have been run. It should not be quoted. hooks have been run. It should not be quoted.
:interactive BOOLEAN :interactive BOOLEAN
Whether the derived mode should be `interactive' or not. Whether the derived mode should be `interactive' or not.

View file

@ -3571,7 +3571,7 @@ This is useful for exiting even if `unwind-protect' code may be executed."
(defun edebug-set-initial-mode () (defun edebug-set-initial-mode ()
"Set the initial execution mode of Edebug. "Set the initial execution mode of Edebug.
The mode is requested via the key that would be used to set the mode in The mode is requested via the key that would be used to set the mode in
edebug-mode." `edebug-mode'."
(interactive) (interactive)
(let* ((old-mode edebug-initial-mode) (let* ((old-mode edebug-initial-mode)
(key (read-key-sequence (key (read-key-sequence
@ -4468,7 +4468,7 @@ With prefix argument, make it a temporary breakpoint."
'read-expression-history))))))) 'read-expression-history)))))))
(edebug-modify-breakpoint t condition arg)) (edebug-modify-breakpoint t condition arg))
(easy-menu-define edebug-menu edebug-mode-map "Edebug menus" edebug-mode-menus) (easy-menu-define edebug-menu edebug-mode-map "Edebug menus." edebug-mode-menus)
;;; Finalize Loading ;;; Finalize Loading

View file

@ -252,7 +252,7 @@ This is used with the `object-write' method.")
:documentation :documentation
"Saving this object should make backup files. "Saving this object should make backup files.
Setting to nil will mean no backups are made.")) Setting to nil will mean no backups are made."))
"This special class enables persistence through save files "This special class enables persistence through save files.
Use the `object-write' method to write this object to disk. The save Use the `object-write' method to write this object to disk. The save
format is Emacs Lisp code which calls the constructor for the saved format is Emacs Lisp code which calls the constructor for the saved
object. For this reason, only slots which do not have an `:initarg' object. For this reason, only slots which do not have an `:initarg'

View file

@ -1035,7 +1035,7 @@ Insert HEADER followed by a blank line if non-nil."
(sit-for 0))) (sit-for 0)))
(defun elint-set-mode-line (&optional on) (defun elint-set-mode-line (&optional on)
"Set the mode-line-process of the Elint log buffer." "Set the `mode-line-process' of the Elint log buffer."
(with-current-buffer (elint-get-log-buffer) (with-current-buffer (elint-get-log-buffer)
(and (eq major-mode 'compilation-mode) (and (eq major-mode 'compilation-mode)
(setq mode-line-process (setq mode-line-process

View file

@ -1958,9 +1958,9 @@ non-nil, returns the face for expected results.."
nil) nil)
(defun ert--results-font-lock-function (enabledp) (defun ert--results-font-lock-function (enabledp)
"Redraw the ERT results buffer after font-lock-mode was switched on or off. "Redraw the ERT results buffer after `font-lock-mode' was switched on or off.
ENABLEDP is true if font-lock-mode is switched on, false ENABLEDP is true if `font-lock-mode' is switched on, false
otherwise." otherwise."
(ert--results-update-ewoc-hf ert--results-ewoc ert--results-stats) (ert--results-update-ewoc-hf ert--results-ewoc ert--results-stats)
(ewoc-refresh ert--results-ewoc) (ewoc-refresh ert--results-ewoc)

View file

@ -147,7 +147,7 @@ and (ewoc--node-nth dll -1) returns the last node."
buffer pretty-printer header footer dll last-node hf-pp) buffer pretty-printer header footer dll last-node hf-pp)
(defmacro ewoc--set-buffer-bind-dll-let* (ewoc varlist &rest forms) (defmacro ewoc--set-buffer-bind-dll-let* (ewoc varlist &rest forms)
"Execute FORMS with ewoc--buffer selected as current buffer, "Execute FORMS with `ewoc--buffer' selected as current buffer,
`dll' bound to the dll, and VARLIST bound as in a let*. `dll' bound to the dll, and VARLIST bound as in a let*.
`dll' will be bound when VARLIST is initialized, but `dll' will be bound when VARLIST is initialized, but
the current buffer will *not* have been changed. the current buffer will *not* have been changed.

View file

@ -668,7 +668,7 @@ sub-iterator function returns via `iter-end-of-sequence'."
(iter-close ,valsym))))) (iter-close ,valsym)))))
(defmacro iter-defun (name arglist &rest body) (defmacro iter-defun (name arglist &rest body)
"Creates a generator NAME. "Create a generator NAME.
When called as a function, NAME returns an iterator value that When called as a function, NAME returns an iterator value that
encapsulates the state of a computation that produces a sequence encapsulates the state of a computation that produces a sequence
of values. Callers can retrieve each value using `iter-next'." of values. Callers can retrieve each value using `iter-next'."

View file

@ -627,7 +627,7 @@ Value for `adaptive-fill-function'."
;; encouraged to use 'lisp-data-mode' instead. ;; encouraged to use 'lisp-data-mode' instead.
(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive (defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive
elisp) elisp)
"Common initialization routine for lisp modes. "Common initialization routine for Lisp modes.
The LISP-SYNTAX argument is used by code in inf-lisp.el and is The LISP-SYNTAX argument is used by code in inf-lisp.el and is
\(uselessly) passed from pp.el, chistory.el, gnus-kill.el and \(uselessly) passed from pp.el, chistory.el, gnus-kill.el and
score-mode.el. KEYWORDS-CASE-INSENSITIVE non-nil means that for score-mode.el. KEYWORDS-CASE-INSENSITIVE non-nil means that for

View file

@ -160,7 +160,7 @@ Each element has the form (WHERE BYTECODE STACK) where:
(t (eval spec)))) (t (eval spec))))
(defun advice--interactive-form (function) (defun advice--interactive-form (function)
;; Like `interactive-form' but tries to avoid autoloading functions. "Like `interactive-form' but tries to avoid autoloading functions."
(when (commandp function) (when (commandp function)
(if (not (and (symbolp function) (autoloadp (indirect-function function)))) (if (not (and (symbolp function) (autoloadp (indirect-function function))))
(interactive-form function) (interactive-form function)

View file

@ -333,7 +333,7 @@ vectors as well as conses."
;;;========================================================================= ;;;=========================================================================
(defun testcover-mark (def) (defun testcover-mark (def)
"Marks one DEF (a function or macro symbol) to highlight its contained forms "Mark one DEF (a function or macro symbol) to highlight its contained forms
that did not get completely tested during coverage tests. that did not get completely tested during coverage tests.
A marking with the face `testcover-nohits' (default = red) indicates that the A marking with the face `testcover-nohits' (default = red) indicates that the
form was never evaluated. A marking using the `testcover-1value' face form was never evaluated. A marking using the `testcover-1value' face