[Top][All Lists]

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

Re: Interactive hat.

From: Stefan Monnier
Subject: Re: Interactive hat.
Date: Wed, 25 Mar 2009 12:18:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

>> How is an external library writer going to use the interactive "^"?
>> Assuming that the library should also work under XEmacs and Emacs 22,
>> just using the "^" won't work; an interactive string with "^" throws an
>> error in Emacs 22.
> Isn't that a pretty basic problem with _any_ extension to interactive?


> Do you think `interactive' should never be extended?

Indeed no.

> In this case, I think the right solution would be to simply add another,
> possibly clunkier method for commands to indicate they want to enable
> shift-selection behavior.

It needs to be easy to translate any `interactive' string into an
`interactive' Elisp expression.  Currently, that's not always the case,
and I think it's a problem that needs to be solved.
If you start with an `interactive' string and later need to add an
argument which needs fancier treatment, you sometimes end up struggling
to find an equivalent Elisp form for each of your arguments.

Yes, this is indeed a problem.  Of course, not specific to "^".

If someone were to rewrite `call-interactive' such that it comes with
a alist associating each char-code to the corresponding Elisp
expression, that would be very helpful (and we could then even provide
a command in emacs-lisp-mode to automatically turn a (interactive "foo")
into (interactive (blabla))).


reply via email to

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