Subject: Re: bug#74056: `LaTeX-insert-item' inserts comment characters if called from inside comment

From: Arash Esbati <[email-masked]>
Date: Fri, 01 Nov 2024 09:26:20 +0100

Hi Keita,

Ikumi Keita <[email-masked]> writes:

> I attach the current patches.

Thanks, I have 2 minor comments, see below.

> diff --git a/doc/auctex.texi b/doc/auctex.texi
> index 718d4c2a..fb20c817 100644
> --- a/doc/auctex.texi
> +++ b/doc/auctex.texi
> @@ -1616,6 +1616,22 @@ paragraph is considered to consist of all preceding and succeeding
>  lines starting with a @samp{%}, until the first non-comment line.
>  @end deffn
>  
> +In doc@TeX{} document, all documentations are commented out.  @AUCTeX{}
> +inserts @samp{%} (with an accompanying space) at the beginning of line
> +when you issue some commands including sectioning (@kbd{C-c C-s}) and
> +inserting environments (@kbd{C-c C-e}), on a commented line.  This
> +behavior is controlled by @code{LaTeX-insert-into-comments}.
> +
> +@defopt LaTeX-insert-into-comments
> +When this option is non-@code{nil}, some editing commands are aware of
> +comment prefix at the beginning of line and insert it in the line created
> +anew.
> +
> +The default value of this option used to be @code{t}, which sometimes
> +caused unintuitive behaviors in normal @LaTeX{} mode.  Now it defaults to
> +@code{nil} and is set to @code{t} in doc@TeX{} mode.
> +@end defopt
> +

I don't think we need to talk about the history in the manual.  I
suggest to change the last paragraph to something like this:

  The default value of this option is @code{nil} in normal @LaTeX{} mode
  and is set to @code{t} in doc@TeX{} mode.

Reg. your other patch: Does it need an ERT-test?

Best, Arash