GNU bug report logs - #7591
24.0.50; incorrect `make-obsolete' for `mouse-major-mode-menu'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Wed, 8 Dec 2010 16:12:01 UTC

Severity: minor

Tags: notabug

Found in version 24.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7591 in the body.
You can then email your comments to 7591 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7591; Package emacs. (Wed, 08 Dec 2010 16:12:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 08 Dec 2010 16:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; incorrect `make-obsolete' for `mouse-major-mode-menu'
Date: Wed, 8 Dec 2010 08:17:37 -0800
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'
 





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7591; Package emacs. (Thu, 09 Dec 2010 22:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 7591 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 7591 <at> debbugs.gnu.org
Subject: Re: bug#7591: 24.0.50;
	incorrect `make-obsolete' for `mouse-major-mode-menu'
Date: Thu, 09 Dec 2010 17:52:15 -0500
> (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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7591; Package emacs. (Fri, 10 Dec 2010 16:41:01 GMT) Full text and rfc822 format available.

Message #11 received at 7591 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> IRO.UMontreal.CA>
Cc: 7591 <at> debbugs.gnu.org
Subject: RE: bug#7591: 24.0.50;
	incorrect `make-obsolete' for `mouse-major-mode-menu'
Date: Fri, 10 Dec 2010 08:46:09 -0800
> > (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.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7591; Package emacs. (Fri, 10 Dec 2010 20:56:02 GMT) Full text and rfc822 format available.

Message #14 received at 7591 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 7591 <at> debbugs.gnu.org
Subject: Re: bug#7591: 24.0.50;
	incorrect `make-obsolete' for `mouse-major-mode-menu'
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




bug closed, send any further explanations to 7591 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 25 Feb 2011 02:44:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 25 Mar 2011 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 92 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.