unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 11028@debbugs.gnu.org
Subject: bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Sun, 01 May 2016 21:46:39 +0200	[thread overview]
Message-ID: <87k2jdy31c.fsf@gnus.org> (raw)
In-Reply-To: <0F3DD8B617604CB59C5138747164263F@us.oracle.com> (Drew Adams's message of "Fri, 16 Mar 2012 11:54:49 -0700")

"Drew Adams" <drew.adams@oracle.com> writes:

>  -1
>  -------------------
>  Turn Off minor mode
>  Help for minor mode

[...]

> Which minor mode?  No idea still.  

This seems like it's been kinda hackishly implemented.

This is the function that shows the menu...

(defun mouse-minor-mode-menu (event)
  "Show minor-mode menu for EVENT on minor modes area of the mode line."
  (interactive "@e")
  (let ((indicator (car (nth 4 (car (cdr event))))))
    (debug event)
    (minor-mode-menu-from-indicator indicator)))

Hm...

but then

(defun minor-mode-menu-from-indicator (indicator)

[...]

  (let* ((minor-mode (lookup-minor-mode-from-indicator indicator))
         (mm-fun (or (get minor-mode :minor-mode-function) minor-mode)))

Wow, that's a roundabout way of doing it...  Anyway, we then have the
mode symbol...  What about using a pretty version of the mode symbol as
the menu header?  That would be "Text Scale Mode" in this case.

I think that would be better than using the lighter as the menu header.

What's the name of the function that creates pretty strings from symbol
names?

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





  parent reply	other threads:[~2016-05-01 19:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16 18:54 bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode' Drew Adams
2012-09-17  0:07 ` Drew Adams
2016-04-28 14:01 ` Lars Ingebrigtsen
2016-05-01 19:38 ` Lars Ingebrigtsen
2016-05-01 19:46 ` Lars Ingebrigtsen [this message]
2016-05-01 20:00   ` Eli Zaretskii
2016-05-01 20:22     ` Lars Ingebrigtsen
2022-01-27 16:36   ` Lars Ingebrigtsen
2022-01-27 16:37   ` Lars Ingebrigtsen

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=87k2jdy31c.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=11028@debbugs.gnu.org \
    --cc=drew.adams@oracle.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 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).