* bug#7591: 24.0.50; incorrect `make-obsolete' for `mouse-major-mode-menu'
@ 2010-12-08 16:17 Drew Adams
2010-12-09 22:52 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2010-12-08 16:17 UTC (permalink / raw)
To: 7591
In mouse.el:
(make-obsolete 'mouse-major-mode-menu 'mouse-menu-major-mode-map "23.1")
That is incorrect. `mouse-major-mode-menu' is a _command_ (and can thus
be bound to a key). `mouse-menu-major-mode-map' is not a command.
Try, for instance, each of these:
(define-key global-map [remap mouse-save-then-kill]
'mouse-major-mode-menu)
(define-key global-map [remap mouse-save-then-kill]
''mouse-menu-major-mode-map)
Try `mouse-3' after each of those.
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2010-12-06 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#7591: 24.0.50; incorrect `make-obsolete' for `mouse-major-mode-menu'
2010-12-08 16:17 bug#7591: 24.0.50; incorrect `make-obsolete' for `mouse-major-mode-menu' Drew Adams
@ 2010-12-09 22:52 ` Stefan Monnier
2010-12-10 16:46 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2010-12-09 22:52 UTC (permalink / raw)
To: Drew Adams; +Cc: 7591
> (make-obsolete 'mouse-major-mode-menu 'mouse-menu-major-mode-map "23.1")
> That is incorrect.
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.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#7591: 24.0.50; incorrect `make-obsolete' for `mouse-major-mode-menu'
2010-12-09 22:52 ` Stefan Monnier
@ 2010-12-10 16:46 ` Drew Adams
2010-12-10 21:01 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2010-12-10 16:46 UTC (permalink / raw)
To: 'Stefan Monnier'; +Cc: 7591
> > (make-obsolete 'mouse-major-mode-menu
> > 'mouse-menu-major-mode-map "23.1")
> >
> > That is incorrect. `mouse-major-mode-menu' is a
> > _command_ (and can thus be bound to a key).
> > `mouse-menu-major-mode-map' is not a command.
>
> 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'.
Consider this user's request:
http://lists.gnu.org/archive/html/help-gnu-emacs/2010-12/msg02016.html
My suggestion to him was this:
>> If you don't care about modes that might bind `C-mouse-3'
>> specially, then just remap its command:
>>
>> (define-key global-map [remap mouse-save-then-kill]
>> 'mouse-major-mode-menu)
Unless there is a _command_ that does what `mouse-major-mode-menu' does, you
cannot do something like that. Or you need to roll your own command.
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? If you
have in mind a better definition, then please add it. But Emacs should have a
command for this, whatever the name and whatever the exact definition.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#7591: 24.0.50; incorrect `make-obsolete' for `mouse-major-mode-menu'
2010-12-10 16:46 ` Drew Adams
@ 2010-12-10 21:01 ` Stefan Monnier
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2010-12-10 21:01 UTC (permalink / raw)
To: Drew Adams; +Cc: 7591
>> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-10 21:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-08 16:17 bug#7591: 24.0.50; incorrect `make-obsolete' for `mouse-major-mode-menu' Drew Adams
2010-12-09 22:52 ` Stefan Monnier
2010-12-10 16:46 ` Drew Adams
2010-12-10 21:01 ` Stefan Monnier
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).