Checkdoc fixes in progmodes
authorStefan Kangas <stefankangas@gmail.com>
Sun, 7 Jul 2024 12:50:18 +0000 (14:50 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sun, 7 Jul 2024 15:46:30 +0000 (17:46 +0200)
* 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.

16 files changed:
lisp/progmodes/cperl-mode.el
lisp/progmodes/eglot.el
lisp/progmodes/etags.el
lisp/progmodes/flymake.el
lisp/progmodes/gdb-mi.el
lisp/progmodes/hideif.el
lisp/progmodes/idlw-help.el
lisp/progmodes/idlwave.el
lisp/progmodes/java-ts-mode.el
lisp/progmodes/js.el
lisp/progmodes/pascal.el
lisp/progmodes/python.el
lisp/progmodes/ruby-mode.el
lisp/progmodes/rust-ts-mode.el
lisp/progmodes/verilog-mode.el
lisp/progmodes/xref.el

index 68ad7eda9a73f1b39ad85f0391a1cbc182a3d057..217125e1599c96655006cef651b7b0fb8b2cb362 100644 (file)
@@ -161,13 +161,13 @@ for constructs with multiline if/unless/while/until/for/foreach condition."
   :group 'cperl-autoinsert-details)
 
 (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
 `cperl-style-alist' for the keyword provided here.  If nil, then
 the individual options as customized are used.
 \"PBP\" is the style recommended in the Book \"Perl Best
 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
 programming languages, mostly C."
   :type '(choice (const "PBP")
@@ -232,7 +232,7 @@ to the right of the start of its line."
   :group 'cperl-indentation-details)
 (defcustom cperl-continued-brace-offset 0
   "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
   :group 'cperl-indentation-details)
 (defcustom cperl-close-paren-offset -1
@@ -819,7 +819,7 @@ B) Speed of editing operations.
     of, say, long POD sections.")
 
 (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-hash-face'                    Hash names
index 574e8571cc83fa4c2fa6128551209750f01ba87e..5845aff39b737e64a36fa45181f686a91bd8cc8c 100644 (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
 `eglot-rename', `eglot-code-actions',
 `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."
   :type (let ((basic-choices
                '((const :tag "Use diff" diff)
@@ -1415,7 +1415,7 @@ INTERACTIVE is ignored and provided for backward compatibility."
      (unless (or (null current-server)
                  (y-or-n-p "\
 [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))
        (when current-server (ignore-errors (eglot-shutdown current-server))))))
   (eglot--connect (eglot--ensure-list managed-major-modes)
@@ -3935,7 +3935,7 @@ If NOERROR, return predicate, else erroring function."
 ;;; List connections 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}"
   :interactive nil
   (setq-local tabulated-list-format
@@ -3977,12 +3977,12 @@ If NOERROR, return predicate, else erroring function."
   "Face used for parameter inlay hint overlays.")
 
 (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-regions-timer nil
-  "Helper timer for `eglot--update-hints'")
+  "Helper timer for `eglot--update-hints'.")
 
 (defun eglot--update-hints (from to)
   "Jit-lock function for Eglot inlay hints."
index 597612196fda83cd23a9f2be75a1e11cf63cfafa..d3eb0d46e9ba8e7c1b35bffc68ce22ba5c544eb5 100644 (file)
@@ -1364,7 +1364,7 @@ hits the start of file."
        (cond (line (progn (goto-char (point-min))
                           (forward-line (1- line))))
              (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.
       ;; There is no sense in making it too small,
       ;; 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)
          (if (boundp symbs)
              (setq symbs (symbol-value symbs))
-           (warn "symbol `%s' has no value" symbs)
+           (warn "Symbol `%s' has no value" symbs)
            (setq symbs nil))
          (if (obarrayp symbs)
              (mapatoms add-xref symbs)
index 6301b77beca9cb0a9fe8dbca9d81f4f915cc09f2..e72f25fd0cdec0093a881d5a45e672edf7233a9d 100644 (file)
@@ -218,7 +218,7 @@ this is used."
                        (face :tag "Face"))))
 
 (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."
   :version "30.1"
index 0ce5e1df794b87df346bbee53914a94d17b65700..2981965ee0cb774dd4baa822af81700687b28cb3 100644 (file)
@@ -1285,8 +1285,8 @@ no input, and GDB is waiting for input."
 (defun gdb-mouse-until (event)
   "Continue running until a source line past the current line.
 The destination source line can be selected either by clicking
-with mouse-3 on the fringe/margin or dragging the arrow
-with mouse-1 (default bindings)."
+with \\`mouse-3' on the fringe/margin or dragging the arrow
+with \\`mouse-1' (default bindings)."
   (interactive "e")
   (let ((start (event-start event))
        (end (event-end event)))
@@ -1302,8 +1302,8 @@ with mouse-1 (default bindings)."
 
 (defun gdb-mouse-jump (event)
   "Set execution address/line.
-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).
+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).
 Unlike `gdb-mouse-until' the destination address can be before the current
 line, and no execution takes place."
   (interactive "e")
index 98e567299a1ce32de0dd94369d6b415b29f37da4..9bcac0d8dc5fd35a406882030e3f6f0a4a4802bf 100644 (file)
@@ -2407,7 +2407,7 @@ first arg will be `hif-etc'."
                       'c99 t)))
        ((eq token 'hif-comma)
         (if etc
-            (error "Syntax error: no comma allowed after `...'.")))
+            (error "Syntax error: no comma allowed after `...'")))
        (t
         (push token result))))
     (setq result (nreverse result))
index 7bed69a738b8fae4085cbe600a1bf6b07f70f900..c311e1c537738c20754c6deb684e6b575d19b73a 100644 (file)
@@ -62,8 +62,8 @@ is used in preference to the old `idlwave-html-help-location'."
    (if (memq system-type '(ms-dos windows-nt))
       nil
     "/usr/local/etc/")
-  "The directory where the idl_html_help/ dir lives.  Obsolete for IDL
-6.2 or later (see `idlwave-html-system-help-location')."
+  "The directory where the idl_html_help/ dir lives.
+Obsolete for IDL 6.2 or later (see `idlwave-html-system-help-location')."
   :type 'directory)
 
 (defcustom idlwave-help-use-assistant t
index 30442fa0d3442f866b62309c24be3f9a38b71cc5..b3e9eb58196c89152a8d7b4751850d3c8d5087a0 100644 (file)
@@ -798,7 +798,7 @@ upper case, regardless of this variable."
 (defcustom idlwave-reserved-word-upcase nil
   "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'.
-Has effect only if in abbrev-mode."
+Has effect only if in `abbrev-mode'."
   :group 'idlwave-abbrev-and-indent-action
   :type 'boolean)
 
index bb4a7df3340e53a6320bf877ef6bc23c3c1552a0..4ceb211ade11f1a24ff9920f28e37f412f71175f 100644 (file)
   "Java operators for tree-sitter font-locking.")
 
 (defun java-ts-mode--string-highlight-helper ()
-"Returns, for strings, a query based on what is supported by
-the available version of Tree-sitter for java."
+  "Return, for strings, a query based on what is supported by
+the available version of Tree-sitter for Java."
   (condition-case nil
       (progn (treesit-query-capture 'java '((text_block) @font-lock-string-face))
             `((string_literal) @font-lock-string-face
index 31e8f2924ac08193a8d7c3e201d1930605d7f111..f8140c14a498193ce36a4e4cf8568602a49b43da 100644 (file)
@@ -2493,7 +2493,7 @@ Returns t if successful, nil if no term was found."
       t)))
 
 (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
 previous line also has a '.' expression.
 This function returns the indentation for the current line if it is
index bd39b64aefcc65362d700a7861117016b15119f0..802c02dcfa478f84eb811e246a58f06350a2805e 100644 (file)
@@ -297,7 +297,8 @@ are handled in another way, and should not be added to this list."
 
 ;;;###autoload
 (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.
 
 \\[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.
  `pascal-auto-endcomments' (default t)
     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)
     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))
 
 (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\":
 `*)' becomes `!(*' and `}' becomes `!{'.
 These deformed comments are returned to normal if you use
index 89eefd1f08a0cc486b5f7a38bf89807768f55e35..f0a8684368371f294a48b2799f0b320b39b1f136 100644 (file)
@@ -1140,8 +1140,8 @@ fontified."
 For example, Lvl1 | Lvl2[Lvl3[Lvl4[Lvl5 | None]], Lvl2].  This
 structure is represented via nesting binary_operator and
 subscript nodes.  This function iterates over all levels and
-highlight identifier nodes. If TYPE-REGEX is not nil fontify type
-identifier only if it matches against TYPE-REGEX. NODE is the
+highlight identifier nodes.  If TYPE-REGEX is not nil fontify type
+identifier only if it matches against TYPE-REGEX.  NODE is the
 binary_operator node.  OVERRIDE is the override flag described in
 `treesit-font-lock-rules'.  START and END mark the region to be
 fontified."
index f6ef175e11e8fbcdb06b8d778aa8144c866daff3..3bcfa9ee7df2c07262af880522d203cba4c7864e 100644 (file)
@@ -336,7 +336,7 @@ Only has effect when `ruby-use-smie' is t."
   "If non-nil, align chained method calls.
 
 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 }
           .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.
 
 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
     .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'.
 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 gem \"rubocop\".  When t, it's used unconditionally.  "
+the gem \"rubocop\".  When t, it is used unconditionally."
   :type '(choice (const :tag "Always" t)
                  (const :tag "No" nil)
                  (const :tag "If rubocop is in Gemfile" check))
index baf0e1ec013f9994466c503f592a884146eae0f8..571ffa9b2205c0c04ee35151276ca500c8502a60 100644 (file)
@@ -427,7 +427,7 @@ delimiters < and >'s."
                             (?> '(5 . ?<))))))))
 
 (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'."
   (and (fboundp 'prettify-symbols-default-compose-p)
        (prettify-symbols-default-compose-p start end match)
index a83bad0e8ed3f423254ceea03aaf94f1aedcee26..65545d523a8fe04eda44c8e09c17180870e0a48d 100644 (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))))
       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)
 
 (defun verilog-read-auto-lisp-present ()
@@ -14043,7 +14043,7 @@ Typing \\[verilog-auto] will call my-verilog-insert-hello and
 expand the above into:
 
            /*AUTOINSERTLISP(my-verilog-insert-hello \"world\")*/
-           // Beginning of automatic insert lisp
+           // Beginning of automatic insert Lisp
            initial $write(\"hello world\");
            // End of automatics
 
@@ -15400,7 +15400,7 @@ and the case items."
 
 (defun verilog-highlight-region (beg end _old-len)
   "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
            verilog-highlight-modules)
     (save-excursion
index 710293b8dbcc84f5c077197d8694eaa2d344a950..5ecb8664da02dbdfd7cf6c98f3b34bceab3bd217 100644 (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))))))
 
 (defun xref--get-history ()
-  "Return xref history using xref-history-storage."
+  "Return xref history using `xref-history-storage'."
   (funcall xref-history-storage))
 
 (defun xref--push-backward (m)