branch: main commit c596290236f1a981c4d3ff557987546518e4da19 Author: Ikumi Keita <ik...@ikumi.que.jp> Commit: Ikumi Keita <ik...@ikumi.que.jp>
Change default of `LaTeX-insert-into-comments' (bug#74056) * latex.el (LaTeX-insert-into-comments): Change default value to nil. Add :safe and :package-version entries. Refill the doc string. * NEWS.org (Changed): Announce the change. * doc/auctex.texi (Commenting): Add explanation of `LaTeX-insert-into-comments' (at last). * doc/todo.texi (Mid-term Goals): Adjust accordingly. --- NEWS.org | 5 +++++ doc/auctex.texi | 15 +++++++++++++++ doc/todo.texi | 2 +- latex.el | 10 ++++++---- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/NEWS.org b/NEWS.org index b5a4bb91..28371831 100644 --- a/NEWS.org +++ b/NEWS.org @@ -30,6 +30,11 @@ - Add preliminary support for parsing =\graphicspath= in =style/graphicx.el=. +** Changed + +- Change the default value of ~LaTeX-insert-into-comments~ from ~t~ to + ~nil~. + * [14.0.7] - 2024-10-05 ** Added diff --git a/doc/auctex.texi b/doc/auctex.texi index 718d4c2a..114b9e8d 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -1616,6 +1616,21 @@ 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 is @code{nil} and is set to @code{t} +in doc@TeX{} mode. +@end defopt + @node Indenting @section Indenting @cindex Formatting diff --git a/doc/todo.texi b/doc/todo.texi index d144ba72..825e21aa 100644 --- a/doc/todo.texi +++ b/doc/todo.texi @@ -78,7 +78,7 @@ texinfo mode.) Following entries should be included in the document: @itemize @minus @item -Variables @code{LaTeX-insert-into-comments}, @code{TeX-translate-location-hook} +Variable @code{TeX-translate-location-hook} @item How to use @code{TeX-auto-add-type}, as well as functions and variables diff --git a/latex.el b/latex.el index 02fd1e33..5e1c628c 100644 --- a/latex.el +++ b/latex.el @@ -66,12 +66,14 @@ A comma-seperated list of strings." (make-variable-buffer-local 'LaTeX-default-options) -(defcustom LaTeX-insert-into-comments t +(defcustom LaTeX-insert-into-comments nil "Whether insertion commands stay in comments. -This allows using the insertion commands even when -the lines are outcommented, like in dtx files." +This allows using the insertion commands even when the lines are +outcommented, like in dtx files." :group 'LaTeX-environment - :type 'boolean) + :type 'boolean + :safe #'booleanp + :package-version '(auctex . "14.0.8")) (defcustom docTeX-indent-across-comments nil "If non-nil, indentation in docTeX is done across comments."