Subject: Re: bug#70365: 29.2; Unable to remove suffixes such as Emacs-Lisp/l or C++//l from mode-name variable

From: Eli Zaretskii <[email-masked]>
Date: Sat, 13 Apr 2024 12:42:10 +0300

tags 70365 notabug
thanks

> From: Animesh Sahu <[email-masked]>
> Date: Sat, 13 Apr 2024 12:56:20 +0530
> 
> I was trying to set up emacs modeline, the major modes however under the variable name "mode-name"
> seems to have a suffix injected, and thus it renders either C++//l instead of C++ and Emacs-Lisp/l instead of
> Emacs-Lisp, I would like it to be simply the name of major mode without extra details. And I don't seem to find
> any way of doing that anywhere on the internet.

Can't you simply overwrite the value of mode-name in your mode hook?

Or modify the value of mode-line-modes to use some other variable
instead of mode-name, and then set the value of that other variable as
you see fit.