unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Please restore `make-obsolete''s functionality.
@ 2010-07-26 20:28 Alan Mackenzie
  2010-07-26 20:49 ` Juanma Barranquero
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Alan Mackenzie @ 2010-07-26 20:28 UTC (permalink / raw)
  To: emacs-devel

Hi, Emacs,

In the definition of `make-obsolete' (in
.../lisp/emacs-list/run-byte.el), the third parameter WHEN is &optional.

At least it was until somebody changed the interactive form to make WHEN
mandatory, on the pretext that "New code should always provide the `when'
argument.".

Please can we remove this Cleverness?  `make-obsolete' also has to work
on OLD code (sometimes very old code) written when WHEN was &optional.
There are 6 occurances inside CC Mode.  I really don't want to waste my
time trying to determine when each of these became obsolete.  There'll be
lots elsewhere too, probably.

The effect of this on me personally is to discourage me from clearing out
compilation warnings (of which there are ~55 in CC Mode).

Please can we have WHEN &optional again?

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Please restore `make-obsolete''s functionality.
  2010-07-26 20:28 Please restore `make-obsolete''s functionality Alan Mackenzie
@ 2010-07-26 20:49 ` Juanma Barranquero
  2010-07-26 21:27   ` Alan Mackenzie
  2010-07-26 21:46 ` Dan Nicolaescu
  2010-07-26 21:55 ` Stefan Monnier
  2 siblings, 1 reply; 10+ messages in thread
From: Juanma Barranquero @ 2010-07-26 20:49 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

On Mon, Jul 26, 2010 at 22:28, Alan Mackenzie <acm@muc.de> wrote:

> Please can we remove this Cleverness?  `make-obsolete' also has to work
> on OLD code (sometimes very old code) written when WHEN was &optional.
> There are 6 occurances inside CC Mode.  I really don't want to waste my
> time trying to determine when each of these became obsolete.  There'll be
> lots elsewhere too, probably.

Can't you just pass nil?

    Juanma



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Please restore `make-obsolete''s functionality.
  2010-07-26 20:49 ` Juanma Barranquero
@ 2010-07-26 21:27   ` Alan Mackenzie
  0 siblings, 0 replies; 10+ messages in thread
From: Alan Mackenzie @ 2010-07-26 21:27 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

Hi, Juanma,

On Mon, Jul 26, 2010 at 10:49:33PM +0200, Juanma Barranquero wrote:
> On Mon, Jul 26, 2010 at 22:28, Alan Mackenzie <acm@muc.de> wrote:

> > Please can we remove this Cleverness?  `make-obsolete' also has to work
> > on OLD code (sometimes very old code) written when WHEN was &optional.
> > There are 6 occurances inside CC Mode.  I really don't want to waste my
> > time trying to determine when each of these became obsolete.  There'll be
> > lots elsewhere too, probably.

> Can't you just pass nil?

I suppose so.  It just doesn't seem a very good use of time.  This issue
has been bugging me for ages to an extent just below that which prompts
urgent action.  That's why I'm so annoyed.  There are enough real
problems to solve that we shouldn't have to lose time and temper dealing
with artificial ones.

>     Juanma

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Please restore `make-obsolete''s functionality.
  2010-07-26 20:28 Please restore `make-obsolete''s functionality Alan Mackenzie
  2010-07-26 20:49 ` Juanma Barranquero
@ 2010-07-26 21:46 ` Dan Nicolaescu
  2010-07-27 19:45   ` Alan Mackenzie
  2010-07-26 21:55 ` Stefan Monnier
  2 siblings, 1 reply; 10+ messages in thread
From: Dan Nicolaescu @ 2010-07-26 21:46 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

Alan Mackenzie <acm@muc.de> writes:

> Hi, Emacs,
>
> In the definition of `make-obsolete' (in
> .../lisp/emacs-list/run-byte.el), the third parameter WHEN is &optional.
>
> At least it was until somebody changed the interactive form to make WHEN
> mandatory, on the pretext that "New code should always provide the `when'
> argument.".
>

byte-run.el still says:

(defun make-obsolete (obsolete-name current-name &optional when)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Please restore `make-obsolete''s functionality.
  2010-07-26 20:28 Please restore `make-obsolete''s functionality Alan Mackenzie
  2010-07-26 20:49 ` Juanma Barranquero
  2010-07-26 21:46 ` Dan Nicolaescu
@ 2010-07-26 21:55 ` Stefan Monnier
  2010-07-27 19:41   ` Alan Mackenzie
  2 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2010-07-26 21:55 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

> Please can we remove this Cleverness?  `make-obsolete' also has to work
> on OLD code (sometimes very old code) written when WHEN was &optional.

It's still optional, although the byte-compiler doesn't know it so
it complains.


        Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Please restore `make-obsolete''s functionality.
  2010-07-26 21:55 ` Stefan Monnier
@ 2010-07-27 19:41   ` Alan Mackenzie
  2010-07-27 21:38     ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Mackenzie @ 2010-07-27 19:41 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Hi, Stefan,

On Mon, Jul 26, 2010 at 11:55:33PM +0200, Stefan Monnier wrote:
> > Please can we remove this Cleverness?  `make-obsolete' also has to work
> > on OLD code (sometimes very old code) written when WHEN was &optional.

> It's still optional, although the byte-compiler doesn't know it so
> it complains.

Stefan, the following is a lie - a barefaced lie:

    "cc-cmds.el:326:2:Warning: make-obsolete called with 2 arguments, but
    requires 3".

It's a mendacious attempt, by deceit, to force hackers into
doing what's considered good for them.  It's not something which happened
accidentally; code was deliberately inserted so as to hide WHEN's
optionality.

What effect does this have?  I can only answer for me, but...  It's a
drag.  It makes the maintenance of my project less fun.  It raises
feelings of guilt and inadequacy in the face of the juggernaut that Emacs
has become.  Will CC Mode still work without crashing if a user stumbles
over one of these `make-obsolete's?  I know the answer now, but I didn't
between when this change was done and yesterday.

Please can't we have the REAL argument list back in the byte compiler?

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Please restore `make-obsolete''s functionality.
  2010-07-26 21:46 ` Dan Nicolaescu
@ 2010-07-27 19:45   ` Alan Mackenzie
  0 siblings, 0 replies; 10+ messages in thread
From: Alan Mackenzie @ 2010-07-27 19:45 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

Hi, Dan,

On Mon, Jul 26, 2010 at 05:46:31PM -0400, Dan Nicolaescu wrote:
> Alan Mackenzie <acm@muc.de> writes:

> > Hi, Emacs,

> > In the definition of `make-obsolete' (in
> > .../lisp/emacs-list/run-byte.el), the third parameter WHEN is &optional.

> > At least it was until somebody changed the interactive form to make WHEN
> > mandatory, on the pretext that "New code should always provide the `when'
> > argument.".


> byte-run.el still says:

> (defun make-obsolete (obsolete-name current-name &optional when)

It does.  The next form after this defun,
`set-advertised-calling-convention' hides the &optional.

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Please restore `make-obsolete''s functionality.
  2010-07-27 19:41   ` Alan Mackenzie
@ 2010-07-27 21:38     ` Stefan Monnier
  2010-07-28 17:29       ` Alan Mackenzie
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2010-07-27 21:38 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

> Stefan, the following is a lie - a barefaced lie:
>     "cc-cmds.el:326:2:Warning: make-obsolete called with 2 arguments, but
>     requires 3".

The &optional is obsolete.  So whether it's a lie or not, I'll let you
decide, but the intention is to let people know that their code needs to
be updated.


        Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Please restore `make-obsolete''s functionality.
  2010-07-27 21:38     ` Stefan Monnier
@ 2010-07-28 17:29       ` Alan Mackenzie
  2010-07-30  8:58         ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Mackenzie @ 2010-07-28 17:29 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Hi, Stefan,

On Tue, Jul 27, 2010 at 11:38:09PM +0200, Stefan Monnier wrote:
> > Stefan, the following is a lie - a barefaced lie:
> >     "cc-cmds.el:326:2:Warning: make-obsolete called with 2 arguments, but
> >     requires 3".

> The &optional is obsolete.  So whether it's a lie or not, I'll let you
> decide, but the intention is to let people know that their code needs
> to be updated.

Just to be clear here, I'm thoroughly in favour of the WHEN parameter
being supplied to make-obsolete.  Just that I feel messed around with,
due to the wording of the message.

How about instead being honest with our hackers, and giving a message
something like:

"cc-cmds.el:326:2:Warning: Please consider supplying a third parameter
\"when\" in invocations of make-obsolete".  Is the byte-compiler
flexible enough to support the output of such messages?

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Please restore `make-obsolete''s functionality.
  2010-07-28 17:29       ` Alan Mackenzie
@ 2010-07-30  8:58         ` Stefan Monnier
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2010-07-30  8:58 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

> How about instead being honest with our hackers, and giving a message
> something like:

> "cc-cmds.el:326:2:Warning: Please consider supplying a third parameter
> \"when\" in invocations of make-obsolete".  Is the byte-compiler
> flexible enough to support the output of such messages?

Of course, but it requires a bit more code first to keep track of
whether the arglist is "real" or "advertized".  I.e. patches welcome (a
good starting point is to look at the commits that add
set-advertised-calling-convention).


        Stefan




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-30  8:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26 20:28 Please restore `make-obsolete''s functionality Alan Mackenzie
2010-07-26 20:49 ` Juanma Barranquero
2010-07-26 21:27   ` Alan Mackenzie
2010-07-26 21:46 ` Dan Nicolaescu
2010-07-27 19:45   ` Alan Mackenzie
2010-07-26 21:55 ` Stefan Monnier
2010-07-27 19:41   ` Alan Mackenzie
2010-07-27 21:38     ` Stefan Monnier
2010-07-28 17:29       ` Alan Mackenzie
2010-07-30  8:58         ` 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).