unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57741: latex-mode still loads buffer with LaTeX-mode
@ 2022-09-11 20:49 uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-09-12 14:56 ` Arash Esbati
  0 siblings, 1 reply; 2+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-09-11 20:49 UTC (permalink / raw)
  To: 57741

Even after removing auctex using "M-x package-delete" changing the buffer with "M-x latex-mode",
loads the buffer with "LaTeX-mode".








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

* bug#57741: latex-mode still loads buffer with LaTeX-mode
  2022-09-11 20:49 bug#57741: latex-mode still loads buffer with LaTeX-mode uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-09-12 14:56 ` Arash Esbati
  0 siblings, 0 replies; 2+ messages in thread
From: Arash Esbati @ 2022-09-12 14:56 UTC (permalink / raw)
  To: 57741; +Cc: uzibalqa

uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> writes:

> Even after removing auctex using "M-x package-delete" changing the
> buffer with "M-x latex-mode", loads the buffer with "LaTeX-mode".

When I do 'emacs -Q' (which means Emacs doesn't load AUCTeX with my
config) and find this .tex file:

\documentclass{article}

\begin{document}
Hello world.
\end{document}

%%% Local Variables:
%%% mode: latex
%%% End:

'C-h m' says:

    The major mode is LaTeX mode defined in tex-mode.el:

    Major mode for editing files of input for LaTeX.
    Makes $ and } display the characters they match.
    Makes " insert `` when it seems to be the beginning of a quotation,
    and '' when it appears to be the end; it inserts " only after a \.

tex-mode.el has this:

    (define-derived-mode latex-mode tex-mode "LaTeX"
      "Major mode for editing files of input for LaTeX.
    [...]

'C-h f define-derived-mode RET' says:

    define-derived-mode is an autoloaded Lisp macro in ‘derived.el’.

    (define-derived-mode CHILD PARENT NAME [DOCSTRING] [KEYWORD-ARGS...]
    &rest BODY)

    Create a new mode CHILD which is a variant of an existing mode PARENT.

    The arguments are as follows:

    CHILD:     the name of the command for the derived mode.
    PARENT:    the name of the command for the parent mode (e.g. ‘text-mode’)
               or nil if there is no parent.
    NAME:      a string that will appear in the mode line (e.g. "HTML")
    [...]

Opening the same file with AUCTeX enabled and hitting 'C-h m says:

    The major mode is LaTeX mode defined in tex-mode.el:

    Major mode for editing files of input for LaTeX.
    Makes $ and } display the characters they match.
    [...]
    This function has :override advice: ‘TeX-latex-mode’.

So don't get confused by the camel-case LaTeX in the mode line; you're
using the stock latex-mode (unless you have another AUCTeX installation
on your disk which is loaded).

Best, Arash





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

end of thread, other threads:[~2022-09-12 14:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-11 20:49 bug#57741: latex-mode still loads buffer with LaTeX-mode uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-12 14:56 ` Arash Esbati

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).