Checkdoc fixes in progmodes

* lisp/progmodes/cperl-mode.el (cperl-file-style)
(cperl-continued-brace-offset, cperl-tips-faces):
* lisp/progmodes/eglot.el (eglot-confirm-server-edits, eglot)
(eglot-list-connections-mode, eglot--outstanding-inlay-hints-region)
(eglot--outstanding-inlay-regions-timer):
* lisp/progmodes/etags.el (etags-goto-tag-location)
(etags--xref-apropos-additional):
* lisp/progmodes/flymake.el (flymake-autoresize-margins):
* lisp/progmodes/gdb-mi.el (gdb-mouse-until, gdb-mouse-jump):
* lisp/progmodes/hideif.el (hif-parse-macro-arglist):
* lisp/progmodes/idlw-help.el (idlwave-html-help-location):
* lisp/progmodes/idlwave.el (idlwave-reserved-word-upcase):
* lisp/progmodes/java-ts-mode.el (java-ts-mode--string-highlight-helper):
* lisp/progmodes/js.el (js--chained-expression-p):
* lisp/progmodes/pascal.el (pascal-mode, pascal-comment-area):
* lisp/progmodes/python.el (python--treesit-fontify-union-types):
* lisp/progmodes/ruby-mode.el (ruby-align-chained-calls)
(ruby-block-indent, ruby-rubocop-use-bundler):
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--prettify-symbols-compose-p):
* lisp/progmodes/verilog-mode.el (verilog-cache-has-lisp)
(verilog-auto-insert-lisp, verilog-highlight-region):
* lisp/progmodes/xref.el (xref--get-history): Various checkdoc fixes.
This commit is contained in:
Stefan Kangas 2024-07-07 14:50:18 +02:00
parent 6757f8e67d
commit 47c79b62dd
16 changed files with 38 additions and 36 deletions

View file

@ -161,13 +161,13 @@ for constructs with multiline if/unless/while/until/for/foreach condition."
:group 'cperl-autoinsert-details) :group 'cperl-autoinsert-details)
(defcustom cperl-file-style nil (defcustom cperl-file-style nil
"Indentation style to use in cperl-mode. "Indentation style to use in `cperl-mode'.
Setting this option will override options as given in Setting this option will override options as given in
`cperl-style-alist' for the keyword provided here. If nil, then `cperl-style-alist' for the keyword provided here. If nil, then
the individual options as customized are used. the individual options as customized are used.
\"PBP\" is the style recommended in the Book \"Perl Best \"PBP\" is the style recommended in the Book \"Perl Best
Practices\" by Damian Conway. \"CPerl\" is the traditional style Practices\" by Damian Conway. \"CPerl\" is the traditional style
of cperl-mode, and \"PerlStyle\" follows the Perl documentation of `cperl-mode', and \"PerlStyle\" follows the Perl documentation
in perlstyle. The other styles have been developed for other in perlstyle. The other styles have been developed for other
programming languages, mostly C." programming languages, mostly C."
:type '(choice (const "PBP") :type '(choice (const "PBP")
@ -232,7 +232,7 @@ to the right of the start of its line."
:group 'cperl-indentation-details) :group 'cperl-indentation-details)
(defcustom cperl-continued-brace-offset 0 (defcustom cperl-continued-brace-offset 0
"Extra indent for substatements that start with open-braces. "Extra indent for substatements that start with open-braces.
This is in addition to cperl-continued-statement-offset." This is in addition to `cperl-continued-statement-offset'."
:type 'integer :type 'integer
:group 'cperl-indentation-details) :group 'cperl-indentation-details)
(defcustom cperl-close-paren-offset -1 (defcustom cperl-close-paren-offset -1
@ -819,7 +819,7 @@ B) Speed of editing operations.
of, say, long POD sections.") of, say, long POD sections.")
(defvar cperl-tips-faces 'please-ignore-this-line (defvar cperl-tips-faces 'please-ignore-this-line
"CPerl mode uses following faces for highlighting: "CPerl mode uses the following faces for highlighting:
`cperl-array-face' Array names `cperl-array-face' Array names
`cperl-hash-face' Hash names `cperl-hash-face' Hash names

View file

@ -494,7 +494,7 @@ If this variable's value can also be an alist ((COMMAND . ACTION)
...) where COMMAND is a symbol designating a command, such as ...) where COMMAND is a symbol designating a command, such as
`eglot-rename', `eglot-code-actions', `eglot-rename', `eglot-code-actions',
`eglot-code-action-quickfix', etc. ACTION is one of the symbols `eglot-code-action-quickfix', etc. ACTION is one of the symbols
described above. The value `t' for COMMAND is accepted and its described above. The value t for COMMAND is accepted and its
ACTION is the default value for commands not in the alist." ACTION is the default value for commands not in the alist."
:type (let ((basic-choices :type (let ((basic-choices
'((const :tag "Use diff" diff) '((const :tag "Use diff" diff)
@ -1415,7 +1415,7 @@ INTERACTIVE is ignored and provided for backward compatibility."
(unless (or (null current-server) (unless (or (null current-server)
(y-or-n-p "\ (y-or-n-p "\
[eglot] Shut down current connection before attempting new one?")) [eglot] Shut down current connection before attempting new one?"))
(user-error "[eglot] Connection attempt aborted by user.")) (user-error "[eglot] Connection attempt aborted by user"))
(prog1 (append (eglot--guess-contact t) '(t)) (prog1 (append (eglot--guess-contact t) '(t))
(when current-server (ignore-errors (eglot-shutdown current-server)))))) (when current-server (ignore-errors (eglot-shutdown current-server))))))
(eglot--connect (eglot--ensure-list managed-major-modes) (eglot--connect (eglot--ensure-list managed-major-modes)
@ -3935,7 +3935,7 @@ If NOERROR, return predicate, else erroring function."
;;; List connections mode ;;; List connections mode
(define-derived-mode eglot-list-connections-mode tabulated-list-mode (define-derived-mode eglot-list-connections-mode tabulated-list-mode
"" "Eglot mode for listing server connections "" "Eglot mode for listing server connections.
\\{eglot-list-connections-mode-map}" \\{eglot-list-connections-mode-map}"
:interactive nil :interactive nil
(setq-local tabulated-list-format (setq-local tabulated-list-format
@ -3977,12 +3977,12 @@ If NOERROR, return predicate, else erroring function."
"Face used for parameter inlay hint overlays.") "Face used for parameter inlay hint overlays.")
(defvar-local eglot--outstanding-inlay-hints-region (cons nil nil) (defvar-local eglot--outstanding-inlay-hints-region (cons nil nil)
"Jit-lock-calculated (FROM . TO) region with potentially outdated hints") "Jit-lock-calculated (FROM . TO) region with potentially outdated hints.")
(defvar-local eglot--outstanding-inlay-hints-last-region nil) (defvar-local eglot--outstanding-inlay-hints-last-region nil)
(defvar-local eglot--outstanding-inlay-regions-timer nil (defvar-local eglot--outstanding-inlay-regions-timer nil
"Helper timer for `eglot--update-hints'") "Helper timer for `eglot--update-hints'.")
(defun eglot--update-hints (from to) (defun eglot--update-hints (from to)
"Jit-lock function for Eglot inlay hints." "Jit-lock function for Eglot inlay hints."

View file

@ -1364,7 +1364,7 @@ hits the start of file."
(cond (line (progn (goto-char (point-min)) (cond (line (progn (goto-char (point-min))
(forward-line (1- line)))) (forward-line (1- line))))
(startpos (goto-char startpos)) (startpos (goto-char startpos))
(t (error "etags.el BUG: bogus direct file tag"))) (t (error "etags.el: BUG: bogus direct file tag")))
;; This constant is 1/2 the initial search window. ;; This constant is 1/2 the initial search window.
;; There is no sense in making it too small, ;; There is no sense in making it too small,
;; since just going around the loop once probably ;; since just going around the loop once probably
@ -2182,7 +2182,7 @@ file name, add `tag-partial-file-name-match-p' to the list value.")
(when (symbolp symbs) (when (symbolp symbs)
(if (boundp symbs) (if (boundp symbs)
(setq symbs (symbol-value symbs)) (setq symbs (symbol-value symbs))
(warn "symbol `%s' has no value" symbs) (warn "Symbol `%s' has no value" symbs)
(setq symbs nil)) (setq symbs nil))
(if (obarrayp symbs) (if (obarrayp symbs)
(mapatoms add-xref symbs) (mapatoms add-xref symbs)

View file

@ -218,7 +218,7 @@ this is used."
(face :tag "Face")))) (face :tag "Face"))))
(defcustom flymake-autoresize-margins t (defcustom flymake-autoresize-margins t
"If non-nil, automatically resize margin-width calling flymake--resize-margins. "If non-nil, automatically resize margin-width calling `flymake--resize-margins'.
Only relevant if `flymake-indicator-type' is set to margins." Only relevant if `flymake-indicator-type' is set to margins."
:version "30.1" :version "30.1"

View file

@ -1285,8 +1285,8 @@ no input, and GDB is waiting for input."
(defun gdb-mouse-until (event) (defun gdb-mouse-until (event)
"Continue running until a source line past the current line. "Continue running until a source line past the current line.
The destination source line can be selected either by clicking The destination source line can be selected either by clicking
with mouse-3 on the fringe/margin or dragging the arrow with \\`mouse-3' on the fringe/margin or dragging the arrow
with mouse-1 (default bindings)." with \\`mouse-1' (default bindings)."
(interactive "e") (interactive "e")
(let ((start (event-start event)) (let ((start (event-start event))
(end (event-end event))) (end (event-end event)))
@ -1302,8 +1302,8 @@ with mouse-1 (default bindings)."
(defun gdb-mouse-jump (event) (defun gdb-mouse-jump (event)
"Set execution address/line. "Set execution address/line.
The destination source line can be selected either by clicking with C-mouse-3 The destination source line can be selected either by clicking with \\`C-mouse-3'
on the fringe/margin or dragging the arrow with C-mouse-1 (default bindings). on the fringe/margin or dragging the arrow with \\`C-mouse-1' (default bindings).
Unlike `gdb-mouse-until' the destination address can be before the current Unlike `gdb-mouse-until' the destination address can be before the current
line, and no execution takes place." line, and no execution takes place."
(interactive "e") (interactive "e")

View file

@ -2407,7 +2407,7 @@ first arg will be `hif-etc'."
'c99 t))) 'c99 t)))
((eq token 'hif-comma) ((eq token 'hif-comma)
(if etc (if etc
(error "Syntax error: no comma allowed after `...'."))) (error "Syntax error: no comma allowed after `...'")))
(t (t
(push token result)))) (push token result))))
(setq result (nreverse result)) (setq result (nreverse result))

View file

@ -62,8 +62,8 @@ is used in preference to the old `idlwave-html-help-location'."
(if (memq system-type '(ms-dos windows-nt)) (if (memq system-type '(ms-dos windows-nt))
nil nil
"/usr/local/etc/") "/usr/local/etc/")
"The directory where the idl_html_help/ dir lives. Obsolete for IDL "The directory where the idl_html_help/ dir lives.
6.2 or later (see `idlwave-html-system-help-location')." Obsolete for IDL 6.2 or later (see `idlwave-html-system-help-location')."
:type 'directory) :type 'directory)
(defcustom idlwave-help-use-assistant t (defcustom idlwave-help-use-assistant t

View file

@ -798,7 +798,7 @@ upper case, regardless of this variable."
(defcustom idlwave-reserved-word-upcase nil (defcustom idlwave-reserved-word-upcase nil
"Non-nil means, reserved words will be made upper case via abbrev expansion. "Non-nil means, reserved words will be made upper case via abbrev expansion.
If nil case of reserved words is controlled by `idlwave-abbrev-change-case'. If nil case of reserved words is controlled by `idlwave-abbrev-change-case'.
Has effect only if in abbrev-mode." Has effect only if in `abbrev-mode'."
:group 'idlwave-abbrev-and-indent-action :group 'idlwave-abbrev-and-indent-action
:type 'boolean) :type 'boolean)

View file

@ -155,8 +155,8 @@
"Java operators for tree-sitter font-locking.") "Java operators for tree-sitter font-locking.")
(defun java-ts-mode--string-highlight-helper () (defun java-ts-mode--string-highlight-helper ()
"Returns, for strings, a query based on what is supported by "Return, for strings, a query based on what is supported by
the available version of Tree-sitter for java." the available version of Tree-sitter for Java."
(condition-case nil (condition-case nil
(progn (treesit-query-capture 'java '((text_block) @font-lock-string-face)) (progn (treesit-query-capture 'java '((text_block) @font-lock-string-face))
`((string_literal) @font-lock-string-face `((string_literal) @font-lock-string-face

View file

@ -2493,7 +2493,7 @@ Returns t if successful, nil if no term was found."
t))) t)))
(defun js--chained-expression-p () (defun js--chained-expression-p ()
"A helper for js--proper-indentation that handles chained expressions. "Helper for `js--proper-indentation' that handles chained expressions.
A chained expression is when the current line starts with '.' and the A chained expression is when the current line starts with '.' and the
previous line also has a '.' expression. previous line also has a '.' expression.
This function returns the indentation for the current line if it is This function returns the indentation for the current line if it is

View file

@ -297,7 +297,8 @@ are handled in another way, and should not be added to this list."
;;;###autoload ;;;###autoload
(define-derived-mode pascal-mode prog-mode "Pascal" (define-derived-mode pascal-mode prog-mode "Pascal"
"Major mode for editing Pascal code.\\<pascal-mode-map> "Major mode for editing Pascal code.
\\<pascal-mode-map>
TAB indents for Pascal code. Delete converts tabs to spaces as it moves back. TAB indents for Pascal code. Delete converts tabs to spaces as it moves back.
\\[completion-at-point] completes the word around current point with respect \ \\[completion-at-point] completes the word around current point with respect \
@ -333,7 +334,7 @@ Variables controlling indentation/edit style:
regardless of where in the line point is when the TAB command is used. regardless of where in the line point is when the TAB command is used.
`pascal-auto-endcomments' (default t) `pascal-auto-endcomments' (default t)
Non-nil means a comment { ... } is set after the ends which ends cases and Non-nil means a comment { ... } is set after the ends which ends cases and
functions. The name of the function or case will be set between the braces. functions. The name of the function or case will be set between the braces.
`pascal-auto-lineup' (default t) `pascal-auto-lineup' (default t)
List of contexts where auto lineup of :'s or ='s should be done. List of contexts where auto lineup of :'s or ='s should be done.
@ -496,7 +497,8 @@ This puts the mark at the end, and point at the beginning."
(pascal-beg-of-defun)) (pascal-beg-of-defun))
(defun pascal-comment-area (start end) (defun pascal-comment-area (start end)
"Put the region into a Pascal comment.\\<pascal-mode-map> "Put the region into a Pascal comment.
\\<pascal-mode-map>
The comments that are in this area are \"deformed\": The comments that are in this area are \"deformed\":
`*)' becomes `!(*' and `}' becomes `!{'. `*)' becomes `!(*' and `}' becomes `!{'.
These deformed comments are returned to normal if you use These deformed comments are returned to normal if you use

View file

@ -1140,8 +1140,8 @@ fontified."
For example, Lvl1 | Lvl2[Lvl3[Lvl4[Lvl5 | None]], Lvl2]. This For example, Lvl1 | Lvl2[Lvl3[Lvl4[Lvl5 | None]], Lvl2]. This
structure is represented via nesting binary_operator and structure is represented via nesting binary_operator and
subscript nodes. This function iterates over all levels and subscript nodes. This function iterates over all levels and
highlight identifier nodes. If TYPE-REGEX is not nil fontify type highlight identifier nodes. If TYPE-REGEX is not nil fontify type
identifier only if it matches against TYPE-REGEX. NODE is the identifier only if it matches against TYPE-REGEX. NODE is the
binary_operator node. OVERRIDE is the override flag described in binary_operator node. OVERRIDE is the override flag described in
`treesit-font-lock-rules'. START and END mark the region to be `treesit-font-lock-rules'. START and END mark the region to be
fontified." fontified."

View file

@ -336,7 +336,7 @@ Only has effect when `ruby-use-smie' is t."
"If non-nil, align chained method calls. "If non-nil, align chained method calls.
Each method call on a separate line will be aligned to the column Each method call on a separate line will be aligned to the column
of its parent. Example: of its parent. Example:
my_array.select { |str| str.size > 5 } my_array.select { |str| str.size > 5 }
.map { |str| str.downcase } .map { |str| str.downcase }
@ -386,7 +386,7 @@ Only has effect when `ruby-use-smie' is t."
"Non-nil to align the body of a block to the statement's start. "Non-nil to align the body of a block to the statement's start.
The body and the closer will be aligned to the column where the The body and the closer will be aligned to the column where the
statement containing the block starts. Example: statement containing the block starts. Example:
foo.bar foo.bar
.each do .each do
@ -2557,7 +2557,7 @@ If there is no Rubocop config file, Rubocop will be passed a flag
"Non-nil with allow `ruby-flymake-rubocop' to use `bundle exec'. "Non-nil with allow `ruby-flymake-rubocop' to use `bundle exec'.
When the value is `check', it will first see whether Gemfile exists in When the value is `check', it will first see whether Gemfile exists in
the same directory as the configuration file, and whether it mentions the same directory as the configuration file, and whether it mentions
the gem \"rubocop\". When t, it's used unconditionally. " the gem \"rubocop\". When t, it is used unconditionally."
:type '(choice (const :tag "Always" t) :type '(choice (const :tag "Always" t)
(const :tag "No" nil) (const :tag "No" nil)
(const :tag "If rubocop is in Gemfile" check)) (const :tag "If rubocop is in Gemfile" check))

View file

@ -427,7 +427,7 @@ delimiters < and >'s."
(?> '(5 . ?<)))))))) (?> '(5 . ?<))))))))
(defun rust-ts-mode--prettify-symbols-compose-p (start end match) (defun rust-ts-mode--prettify-symbols-compose-p (start end match)
"Return true iff the symbol MATCH should be composed. "Return non-nil if the symbol MATCH should be composed.
See `prettify-symbols-compose-predicate'." See `prettify-symbols-compose-predicate'."
(and (fboundp 'prettify-symbols-default-compose-p) (and (fboundp 'prettify-symbols-default-compose-p)
(prettify-symbols-default-compose-p start end match) (prettify-symbols-default-compose-p start end match)

View file

@ -9950,7 +9950,7 @@ For example if declare A A (.B(SIG)) then B will be included in the list."
(setq sig-list (cons (list (match-string-no-properties 1) nil nil) sig-list)))) (setq sig-list (cons (list (match-string-no-properties 1) nil nil) sig-list))))
sig-list))) sig-list)))
(defvar verilog-cache-has-lisp nil "True if any AUTO_LISP in buffer.") (defvar verilog-cache-has-lisp nil "Non-nil if any AUTO_LISP in buffer.")
(make-variable-buffer-local 'verilog-cache-has-lisp) (make-variable-buffer-local 'verilog-cache-has-lisp)
(defun verilog-read-auto-lisp-present () (defun verilog-read-auto-lisp-present ()
@ -14043,7 +14043,7 @@ Typing \\[verilog-auto] will call my-verilog-insert-hello and
expand the above into: expand the above into:
/*AUTOINSERTLISP(my-verilog-insert-hello \"world\")*/ /*AUTOINSERTLISP(my-verilog-insert-hello \"world\")*/
// Beginning of automatic insert lisp // Beginning of automatic insert Lisp
initial $write(\"hello world\"); initial $write(\"hello world\");
// End of automatics // End of automatics
@ -15400,7 +15400,7 @@ and the case items."
(defun verilog-highlight-region (beg end _old-len) (defun verilog-highlight-region (beg end _old-len)
"Colorize included files and modules in the (changed?) region. "Colorize included files and modules in the (changed?) region.
Clicking on the middle-mouse button loads them in a buffer (as in dired)." Clicking on the middle-mouse button loads them in a buffer (as in Dired)."
(when (or verilog-highlight-includes (when (or verilog-highlight-includes
verilog-highlight-modules) verilog-highlight-modules)
(save-excursion (save-excursion

View file

@ -487,7 +487,7 @@ Override existing value with NEW-VALUE if NEW-VALUE is set."
(set-window-parameter w 'xref--history (xref--make-xref-history)))))) (set-window-parameter w 'xref--history (xref--make-xref-history))))))
(defun xref--get-history () (defun xref--get-history ()
"Return xref history using xref-history-storage." "Return xref history using `xref-history-storage'."
(funcall xref-history-storage)) (funcall xref-history-storage))
(defun xref--push-backward (m) (defun xref--push-backward (m)