all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Animesh Sahu <animeshz916@gmail.com>
Cc: 70365@debbugs.gnu.org
Subject: bug#70365: 29.2; Unable to remove suffixes such as Emacs-Lisp/l or C++//l from mode-name variable
Date: Sat, 13 Apr 2024 15:00:39 +0300	[thread overview]
Message-ID: <86cyqtpj4o.fsf@gnu.org> (raw)
In-Reply-To: <CA+pP8JA-u7VztkUPsHB6EjzmmWnsUxnC21NX4izvXneNsLZo1g@mail.gmail.com> (message from Animesh Sahu on Sat, 13 Apr 2024 16:18:20 +0530)

[Please use Reply All to reply, to keep the bug tracker CC'ed.]

> From: Animesh Sahu <animeshz916@gmail.com>
> Date: Sat, 13 Apr 2024 16:18:20 +0530
> 
> I would not like this to be a per-mode fix for every language, I already linked closest I could get to this issue, in
> my previous mail:
> 
> > Closest I could find something is here:
> https://www.reddit.com/r/emacs/comments/8v8de4/change_modename_for_major_mode/ it suggests doing
> something like (defalias 'c-update-modeline #'ignore), but this doesn't seem right way to do it, since its
> basically doing only for C or C++ language, same has to be done for java, ts, many more. Also Emacs-Lisp/l
> doesn't have similar function that can be suppressed with 'ignore either, so I don't see a concrete way of
> doing it.

You should be able to do this globally in a
after-change-major-mode-hook, I think.  Although I don't think I
understand how you can do that regardless of the mode, since you
cannot know in advance what will a mode possibly append to mode-name
-- it could be something you want to leave alone in some modes.  So a
mode-specific setting sounds like the best idea to me, if you ask me.

There's also the other possibility I mentioned: to modify
mode-line-modes so as to use some other variable for showing the mode
name.  You can then control the value of that variable.  This is not a
mode specific solution.

> I would like to have these variables populated by their own modes. Although I don't find a generic way to
> disable that in all the languages / major modes. 

I'm not sure what is it that you expect us to do here.  We are not
going to change how these mode names are displayed by default, so
whatever you want to do it will have to be in your own local
customizations.  I've pointed out several possible ways of performing
such customizations.  If this is not enough, or you need more
assistance in accomplishing this, I suggest to post a question on
help-gnu-emacs@gnu.org, where people could help you implement this.





  parent reply	other threads:[~2024-04-13 12:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-13  7:26 bug#70365: 29.2; Unable to remove suffixes such as Emacs-Lisp/l or C++//l from mode-name variable Animesh Sahu
2024-04-13  9:42 ` Eli Zaretskii
     [not found]   ` <CA+pP8JA-u7VztkUPsHB6EjzmmWnsUxnC21NX4izvXneNsLZo1g@mail.gmail.com>
2024-04-13 12:00     ` Eli Zaretskii [this message]
     [not found]       ` <CA+pP8JAKMERzwDAptyZq5BK1T+=FSiWA7cMrPwpHEg8dHXHSYg@mail.gmail.com>
2024-04-13 14:30         ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86cyqtpj4o.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70365@debbugs.gnu.org \
    --cc=animeshz916@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.