emacs-devel
[Top][All Lists]
Advanced

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

Re: Interactive hat.


From: Alan Mackenzie
Subject: Re: Interactive hat.
Date: Thu, 26 Mar 2009 15:27:38 +0000
User-agent: Mutt/1.5.9i

Hi, Stefan!

On Thu, Mar 26, 2009 at 09:50:27AM -0400, Stefan Monnier wrote:
> > If we're going to be keeping interactive-hat, I think we definitely need
> > some sort of warning to package maintainers to be careful with it, and we
> > should offer them a recipe for maintaining compatibility.

> I think you're blinded by your hatred of this (mis)feature.

Yes, I hate this feature.  But rather than blinding me, this has opened
my eyes to its problems, and I am thus motivated to root them out.  By
contrast, those who like the feature will be blind to these problems.

> It has nothing particularly more special than any other new feature
> we introduced.

Sorry, I disagree.

> Yes, if people use it, they get backward compatibility problems.
> So what?

OK, I'm speaking here as a representative of external package
maintainers, even if not elected.

I don't feel it's appropriate to be so cavalier with external hackers'
time and effort.  More than once, in the past 8 or 9 years, I've asked
myself "what were these idiots thinking about when they implemented
this?".  It's not good to encourage package maintainers to think of the
Emacs core team as idiots, especially since I've become one myself ;-).

It is not a good use of hackers' time and energy to keep reinventing the
wheel.  It isn't fun working round incompatibilities between various
(X)Emacs versions.  Really it isn't.  It's boring, it's drudgery, isn't
at all creative, saps enthusiasm and it diverts effort from adding new
snazzy features.

This particular feature is an order of magnitude nastier to field than
most.  A typical conscientious package maintainer is going to go through
all the thoughts that we've posting on emacs-devel, and most of the time
will come up with some sub-optimal half-solution.  Probably, they'll
just decide not to use "^".  At the end of it all, a weekend's hacking
time per hacker has been lost.

#########################################################################

Anyhow, I've discovered that this problem is not new, and it's already
been solved.  XEmacs put a "_" into their interactive string long ago,
and there's a macro `defunx' in antlr-mode.el which, when used in place
of `defun', strips out the "_" from an interactive string; OK, it does a
few other things, too.

How about adapting this macro and putting it into a special source file
in .../lisp/, and making a discreet mention of it in "Using Interactive"
in the elisp manual?  For example: "Note that using \"^\" will prevent
your function running in older Emacs versions.  If you need this
compatibility, consider using the macro `defunh' in the file
lisp/compatibility.el.".

I would far rather put the work in here and now than have to field
complaints on bug-cc-mode in a year's time, asking why the CC Mode
commands don't work with shift-select-mode.

So, how about it?  This solution will leave interactive-hat, as it is
currently implemented, untouched, and it will stop me moaning about it
for ever.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

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