GNU bug report logs -
#61210
28.2; Request to modify code which can accidentally overwrite AUCTeX function
Previous Next
Reported by: Ikumi Keita <ikumi <at> ikumi.que.jp>
Date: Wed, 1 Feb 2023 12:14:01 UTC
Severity: normal
Tags: moreinfo
Found in version 28.2
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi Stefan,
>>>>> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> In Emacs-29 (see commit 18d75b4ab91fef6e344e612580088b714acfdb6e), the
> above `defalias` are now predefined once and for all:
> ;;;###autoload (defalias 'TeX-mode #'tex-mode)
> ;;;###autoload (defalias 'plain-TeX-mode #'plain-tex-mode)
> ;;;###autoload (defalias 'LaTeX-mode #'latex-mode)
> It's still not ideal, but at least loading `tex-mode` won't override
> any other definition such as AUCTeX's.
Thanks, then AUCTeX can use LaTeX-mode etc. for names of its own major
modes for emacs 29 and later. (I assume that it isn't problematic that
AUCTeX overrides unconditionally them by `autoload' for them in the init
code and
(define-derived-mode LaTeX-mode text-mode "LaTeX" ...)
or
(defun LaTeX-mode () ...)
later.)
> I'd like to hear what you think about this "solution", both in the
> short term and what we could try to do in the longer term (e.g. I'd
> like to aim to get rid of those defaliases, but I'm not sure how to
> get there progressively.
I see that `major-mode-remap-alist' was also incorporated into emacs-29.
So in short term, the conflicts between built-in modes and AUCTeX modes
will reduce, and disappear when the least supported emacs version is
raised to emacs-29.
In the longer term, I think there's no practical problem regardless
of existence of those aliases.
1. If they persist, AUCTeX changes the doc string for LaTeX-mode etc.
in a brutal manner, but most ordinary users won't mind it. (Maybe it
increases difficulty a bit in debug process? But I expect that
drawback is small enough.)
2. The only reason that built-in tex-mode.el needs those aliases is, as
you wrote in tex-mode.el, "for those users who may have files
annotated with -*- LaTeX -*- (e.g. because they received them from
someone using AUCTeX)." They can install AUCTeX even when those
aliases are erased.
Best regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
This bug report was last modified 1 year and 250 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.