Subject: bug#37325: About 'latex-insert/close-block' in 'latex-mode'

From: Sebastian Urban <[email-masked]>
Date: Mon, 4 May 2020 16:48:08 +0200

>> 3.  In INFO 25.11.2 "LaTeX Editing Commands" for 'C-c C-o' alias
 >> 'tex-latex-block' is used and for 'C-c C-e' alias
 >> 'tex-close-latex-block' is used - why not real functions names:
 >> 'latex-insert-block' and 'latex-close-block'?  They would even sound
 >> better (look at the name of the section).
 >
 > And this is a bug.  In "tex-mode.el", under "tex-mode-map", there is:
 >
 >  (define-key map "\C-c\C-o" 'latex-insert-block)
 > AND
 >  (define-key map "\C-c\C-e" 'latex-close-block)
 >
 > In "text.texi", lines 1666, 1669, 1676 and 1691 should be updated.

I'm attaching diff for this, to help a bit.

S. U.

--- old/text.texi	2020-05-04 16:18:42.920418600 +0200
+++ new/text.texi	2020-05-04 16:37:46.208831200 +0200
@@ -1663,17 +1663,17 @@
 @table @kbd
 @item C-c C-o
 Insert @samp{\begin} and @samp{\end} for @LaTeX{} block and position
-point on a line between them (@code{tex-latex-block}).
+point on a line between them (@code{latex-insert-block}).
 @item C-c C-e
 Close the innermost @LaTeX{} block not yet closed
-(@code{tex-close-latex-block}).
+(@code{latex-close-block}).
 @end table
 
-@findex tex-latex-block
+@findex latex-insert-block
 @kindex C-c C-o @r{(@LaTeX{} mode)}
   In @LaTeX{} input, @samp{\begin} and @samp{\end} tags are used to
 group blocks of text.  To insert a block, type @kbd{C-c C-o}
-(@code{tex-latex-block}).  This prompts for a block type, and inserts
+(@code{latex-insert-block}).  This prompts for a block type, and inserts
 the appropriate matching @samp{\begin} and @samp{\end} tags, leaving a
 blank line between the two and moving point there.
 
@@ -1684,11 +1684,11 @@
 want additional block types for completion, customize the list
 variable @code{latex-block-names}.
 
-@findex tex-close-latex-block
+@findex latex-close-block
 @kindex C-c C-e @r{(@LaTeX{} mode)}
 @findex latex-electric-env-pair-mode
   In @LaTeX{} input, @samp{\begin} and @samp{\end} tags must balance.
-You can use @kbd{C-c C-e} (@code{tex-close-latex-block}) to insert an
+You can use @kbd{C-c C-e} (@code{latex-close-block}) to insert an
 @samp{\end} tag which matches the last unmatched @samp{\begin}.  It
 also indents the @samp{\end} to match the corresponding @samp{\begin},
 and inserts a newline after the @samp{\end} tag if point is at the