Subject: Re: bug#7591: 24.0.50; incorrect `make-obsolete' for `mouse-major-mode-menu'

From: Stefan Monnier <[email-masked]>
Date: Fri, 10 Dec 2010 16:01:47 -0500

>> The argument to make-obsolete is not intended to say "foobar is
>> a drop-in-replacement for barbaz", just that "barbaz has been found
>> undesirable, its successor is foobar".  Often one needs to 
>> adjust things if one wants to switch to the new non-obsolete
>> alternative.
> Even if that is the case it is not helpful here.  The best command to use for
> this is the _only_ command that exists (so far): `mouse-major-mode-menu'.

Right, so you "need to adjust things".  This case really doesn't seem to
be any different.

> Unless there is a _command_ that does what `mouse-major-mode-menu' does, you
> cannot do something like that.

No part of Emacs needs such a command, and very few users (or external
packages) would use it.  So I'm far from convinced it is warranted.

> Or you need to roll your own command.

Exactly.  Something along lines of

  (defun my-command ()
    (x-popup-menu nil mouse-menu-major-mode-map))

should do the trick.
    
> Emacs should offer a command for this, as it has in the past.  What is wrong
> with the existing `mouse-major-mode-menu' that it should be removed?

mouse-menu-major-mode-map works as well or better (better because C-h
k can be used to find the name of a function bound to a particular menu
entry) for all uses we care about.  So we don't need
mouse-major-mode-menu any more.

        Stefan