From da911a1fbef1986c3c8f41a32382fe08f680f0f0 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 8 Jul 2024 17:16:32 +0200 Subject: [PATCH] Checkdoc fixes in `textmodes/*.el` * lisp/textmodes/ispell.el (ispell-command-loop): * lisp/textmodes/mhtml-mode.el (mhtml--construct-submode): * lisp/textmodes/page-ext.el (pages-set-delimiter): * lisp/textmodes/refbib.el (r2b-get-field, r2b-put-field): * lisp/textmodes/refer.el (refer-cache-bib-files): * lisp/textmodes/reftex-index.el (reftex-index-phrase-selection-or-word): (reftex-index-phrases-mode): * lisp/textmodes/table.el (table-insert, table--fill-region-strictly): Checkdoc fixes. (cherry picked from commit 336aa6ab17a25351d54bb66fb66939ca27a6e94a) --- lisp/textmodes/ispell.el | 2 +- lisp/textmodes/mhtml-mode.el | 2 +- lisp/textmodes/page-ext.el | 2 +- lisp/textmodes/refbib.el | 21 +++++++++++---------- lisp/textmodes/refer.el | 6 +++--- lisp/textmodes/reftex-index.el | 6 +++--- lisp/textmodes/table.el | 10 +++++----- 7 files changed, 25 insertions(+), 24 deletions(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index caf59995c01..667da10d7a3 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -2416,7 +2416,7 @@ Global `ispell-quit' is set to start location to continue spell session." (progn (set-marker ispell-recursive-edit-marker nil) (error - "Cannot continue ispell from this buffer."))) + "Cannot continue ispell from this buffer"))) (set-marker ispell-recursive-edit-marker nil))) (list word nil)) ; recheck starting at this word. ((= char ?\C-z) diff --git a/lisp/textmodes/mhtml-mode.el b/lisp/textmodes/mhtml-mode.el index e2de6959dc6..987d3d7345c 100644 --- a/lisp/textmodes/mhtml-mode.el +++ b/lisp/textmodes/mhtml-mode.el @@ -86,7 +86,7 @@ code(); "Regexp matching the prefix of buffer-locals we want to capture.") (defun mhtml--construct-submode (mode &rest args) - "A wrapper for make-mhtml--submode that computes the buffer-local variables." + "A wrapper for `make-mhtml--submode' that computes the buffer-local variables." (let ((captured-locals nil) (crucial-captured-locals nil) (submode (apply #'make-mhtml--submode args))) diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index f5f59adb0cf..1681f86b343 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -486,7 +486,7 @@ contain matches to the regexp.)") (define-obsolete-function-alias 'set-page-delimiter #'pages-set-delimiter "27.1") (defun pages-set-delimiter (regexp reset-p &optional interactively) - "Set buffer local value of page-delimiter to REGEXP. + "Set buffer local value of `page-delimiter' to REGEXP. Called interactively with a prefix argument, reset `page-delimiter' to its original value. diff --git a/lisp/textmodes/refbib.el b/lisp/textmodes/refbib.el index dd548e00d9b..087e097649e 100644 --- a/lisp/textmodes/refbib.el +++ b/lisp/textmodes/refbib.el @@ -270,13 +270,13 @@ This is in addition to the `r2b-capitalize-title-stop-words'.") (princ (apply (function format) args) r2b-out-buf)) (defun r2b-get-field (var field &optional unique required capitalize) - "Set VAR to string value of FIELD, if any. If none, VAR is set to -nil. If multiple fields appear, then separate values with the -'\\nand\\t\\t', unless UNIQUE is non-nil, in which case log a warning -and just concatenate the values. Trim off leading blanks and tabs on -first line, and trailing blanks and tabs of every line. Log a warning -and set VAR to the empty string if REQUIRED is true. Capitalize as a -title if CAPITALIZE is true. Returns value of VAR." + "Set VAR to string value of FIELD, if any. +If none, VAR is set to nil. If multiple fields appear, then separate +values with the '\\nand\\t\\t', unless UNIQUE is non-nil, in which case +log a warning and just concatenate the values. Trim off leading blanks +and tabs on first line, and trailing blanks and tabs of every line. Log +a warning and set VAR to the empty string if REQUIRED is true. +Capitalize as a title if CAPITALIZE is true. Return value of VAR." (let (item val (not-past-end t)) (r2b-trace "snarfing %s" field) (goto-char (point-min)) @@ -406,9 +406,10 @@ title if CAPITALIZE is true. Returns value of VAR." (defun r2b-put-field (field data &optional abbrevs) - "Print bibtex FIELD = {DATA} if DATA not null; precede -with a comma and newline; if ABBREVS list is given, then -try to replace the {DATA} with an abbreviation." + "Print bibtex FIELD = {DATA} if DATA not null; precede with comma and newline. + +If ABBREVS list is given, then try to replace the {DATA} with an +abbreviation." (if data (let (match nodelim index) ;; multi-line (cond diff --git a/lisp/textmodes/refer.el b/lisp/textmodes/refer.el index 0fbe4a30b11..f5f4be75c03 100644 --- a/lisp/textmodes/refer.el +++ b/lisp/textmodes/refer.el @@ -113,9 +113,9 @@ each time it is needed." (defcustom refer-cache-bib-files t "Variable determining whether the value of `refer-bib-files' should be cached. -If t, initialize the value of refer-bib-files the first time it is used. If -nil, re-read the list of \\.bib files depending on the value of `refer-bib-files' -each time it is needed." +If t, initialize the value of refer-bib-files the first time it is used. +If nil, re-read the list of \\.bib files depending on the value of +`refer-bib-files' each time it is needed." :type 'boolean) (defcustom refer-bib-files-regexp "\\\\bibliography" diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index db476ff5c0b..cb491367c8d 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el @@ -1263,7 +1263,7 @@ This gets refreshed in every phrases command.") (defun reftex-index-phrase-selection-or-word (arg) "Add current selection or word at point to the phrases buffer. \\ -When you are in transient-mark-mode and the region is active, the +When you are in `transient-mark-mode' and the region is active, the selection will be used - otherwise the word at point. You get a chance to edit the entry in the phrases buffer - finish with \\[reftex-index-phrases-save-and-return]." @@ -1363,8 +1363,8 @@ If the buffer is non-empty, delete the old header first." ;;;###autoload (define-derived-mode reftex-index-phrases-mode fundamental-mode "Phrases" "Major mode for managing the Index phrases of a LaTeX document. -This buffer was created with RefTeX. \\ - +This buffer was created with RefTeX. +\\ To insert new phrases, use - `C-c \\' in the LaTeX document to copy selection or word - `\\[reftex-index-new-phrase]' in the phrases buffer. diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 2087fd8271b..918c84bc949 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -1456,8 +1456,8 @@ first cell. |-!- | | | +-----+-----+-----+ -Inside a table cell, there are special key bindings. \\ - +Inside a table cell, there are special key bindings. +\\ M-9 \\[table-widen-cell] (or \\[universal-argument] 9 \\[table-widen-cell]) widens the first cell by 9 character width, which results as @@ -1466,7 +1466,7 @@ width, which results as +--------------+-----+-----+ Type TAB \\[table-widen-cell] then type TAB M-2 M-7 \\[table-widen-cell] (or \\[universal-argument] 2 7 \\[table-widen-cell]). Typing -TAB moves the point forward by a cell. The result now looks like this: +TAB moves the point forward by a cell. The result now looks like this: +--------------+------+--------------------------------+ | | |-!- | @@ -5301,8 +5301,8 @@ Current buffer must already be set to the cache buffer." (defun table--fill-region-strictly (beg end) "Fill region strictly so that no line exceeds `fill-column'. -When a word exceeds fill-column the word is chopped into pieces. The -chopped location is indicated with table-word-continuation-char." +When a word exceeds `fill-column' the word is chopped into pieces. The +chopped location is indicated with `table-word-continuation-char'." (or (and (markerp beg) (markerp end)) (error "markerp")) (if (< fill-column 2) -- 2.39.2