bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33092: 26.1; Re-running shell wipes font-lock from xterm-color


From: Lars Ingebrigtsen
Subject: bug#33092: 26.1; Re-running shell wipes font-lock from xterm-color
Date: Wed, 30 Oct 2019 20:18:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Allen Li <darkfeline@felesatra.moe> writes:

> The `shell' command will call `make-comint-in-buffer' and `shell-mode'.
>
> `shell-mode' will then call `comint-mode' as a derived mode.
>
> `comint-mode' will call `kill-all-local-variables'.
>
> `comint-mode' also adds `font-lock-defontify' to
> `change-major-mode-hook'.  Since we're already in `shell-mode' derived
> from `comint-mode', switching "back" to `shell-mode' wipes font-lock.
>
> I can work around this pretty easily in my personal config, by removing
> `font-lock-defontify' from `change-major-mode-hook' with a well-placed
> advice, but the current behavior doesn't seem comfortable to me.

Yes, that seems odd.  Unfortunately the commit log for this just says:

commit 3dd4c1c5af3cdf77ba98b7255ec4034051107c6f
Author: Richard M. Stallman <rms@gnu.org>
Date:   Tue Sep 10 16:44:58 2002 +0000

    (comint-mode): Add font-lock-defontify to change-major-mode-hook.

So I have no idea what this was supposed to fix.  Richard, do you
remember, by any chance?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]