From: Gabriele Nicolardi <gabriele@medialab.sissa.it>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 69404@debbugs.gnu.org
Subject: bug#69404: Loss of latex-mode fontification when loading libraries in latex-mode-hook that require json-mode
Date: Mon, 26 Feb 2024 16:41:15 +0100 [thread overview]
Message-ID: <d0258eab-e5dc-437c-8a2b-246fdd3aeed6@medialab.sissa.it> (raw)
In-Reply-To: <861q8zwf6w.fsf@gnu.org>
Il 26/02/24 14:03, Eli Zaretskii ha scritto:
>> Date: Mon, 26 Feb 2024 10:27:53 +0100
>> From: Gabriele Nicolardi <gabriele@medialab.sissa.it>
>>
>> I have a LaTeX file:
>>
>> \documentclass{article}
>> \usepackage{mwe}
>> \begin{document}
>>
>> \blindtext
>>
>> \noindent
>> \includegraphics[width=.4\textwidth]{example-image-a}\hfill
>> \includegraphics[width=.4\textwidth]{example-image-b}
>>
>> \blindtext
>>
>> \end{document}
>>
>> If I load it like this:
>>
>> emacs -Q test.tex
>>
>> I get this “correct” latex-mode fontification:
>>
>> I have also a config file (I simplified it to obtain the feature):
>>
>> (add-hook 'latex-mode-hook
>> #'(lambda ()
>> (package-initialize)
>> (require 'json-mode)))
>>
>> If I load my .tex file like this:
>>
>> emacs -Q --eval "(load-file \"/tmp/config.el\")" test.tex
>>
>> I lose latex-mode fontification:
> What is the value of major-mode after you load your .tex file as
> above?
In the buffer loaded as above, with the wrong fontification, I have:
major-mode is a variable defined in ‘C source code’.
Its value is ‘latex-mode’
Original value was ‘fundamental-mode’
Local in buffer test.tex; global value is fundamental-mode
next prev parent reply other threads:[~2024-02-26 15:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 9:27 bug#69404: Loss of latex-mode fontification when loading libraries in latex-mode-hook that require json-mode Gabriele Nicolardi
2024-02-26 13:03 ` Eli Zaretskii
2024-02-26 15:41 ` Gabriele Nicolardi [this message]
2024-02-26 15:57 ` Eli Zaretskii
2024-02-26 16:24 ` Gabriele Nicolardi
2024-02-28 13:29 ` Gabriele Nicolardi
2024-02-28 13:41 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0258eab-e5dc-437c-8a2b-246fdd3aeed6@medialab.sissa.it \
--to=gabriele@medialab.sissa.it \
--cc=69404@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).