unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55716: 29.0.50; latex-mode overrides my `comment-style` choice
@ 2022-05-29 21:57 Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-30 18:24 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-29 21:57 UTC (permalink / raw)
  To: 55716

Package: Emacs
Version: 29.0.50


latex-mode started to impose the old `plain` comment-style a few months
ago, which I find rather annoying and not very user-friendly.
At first, I thought it was a bug somewhere in my config, but I now see
that it comes from:

    commit 0870ebb3cbfcb097d85eea5eacaf992dd88ed204
    Author: Lars Ingebrigtsen <larsi@gnus.org>
    Date:   Thu Jan 28 07:09:18 2021 +0100
    
        Allow commenting out white space lines in latex-mode
        
        * lisp/newcomment.el (comment-region-default-1): Allow commenting
        out whitespace-only regions (bug#41793).
        
        * lisp/textmodes/tex-mode.el (latex--comment-region): Use it.
        (latex-mode): Set a comment style shim.

    diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
    index c4e4864da17..ce665e61656 100644
    --- a/lisp/textmodes/tex-mode.el
    +++ b/lisp/textmodes/tex-mode.el
    @@ -1169,7 +1169,12 @@ latex-mode
       (setq-local outline-regexp latex-outline-regexp)
       (setq-local outline-level #'latex-outline-level)
       (setq-local forward-sexp-function #'latex-forward-sexp)
    -  (setq-local skeleton-end-hook nil))
    +  (setq-local skeleton-end-hook nil)
    +  (setq-local comment-region-function #'latex--comment-region)
    +  (setq-local comment-style 'plain))
    +
    +(defun latex--comment-region (beg end &optional arg)
    +  (comment-region-default-1 beg end arg t))
     
     ;;;###autoload
     (define-derived-mode slitex-mode latex-mode "SliTeX"

The commit message doesn't explain why it changes `comment-style`.
Was that an oversight?


        Stefan






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-01  2:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-29 21:57 bug#55716: 29.0.50; latex-mode overrides my `comment-style` choice Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-30 18:24 ` Lars Ingebrigtsen
2022-05-31 12:26   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-31 18:27     ` Lars Ingebrigtsen
2022-05-31 18:54     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-01  2:33       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).