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

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

bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'


From: Lars Ingebrigtsen
Subject: bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Sun, 01 May 2016 21:46:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

"Drew Adams" <address@hidden> 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





reply via email to

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