[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: |
Thu, 26 Mar 2009 13:09:48 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
> 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.
The feature is a result of a long and painful process. I have no
intention to go through it again. I think the result is pretty clean,
so I'm not open to changing it, except for minor aspects.
> 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.
What about my other suggestion to make it available to interactive
specs using a Lisp form rather than a string? That would seem a lot
simpler and cleaner.
So, I've indeed done that, which incidentally simplifies the code.
Now inserting a "^" in the interactive string is just the same as
calling (handle-shift-selection), so you can write
(interactive
(progn (if (fboundp 'handle-shift-selection) (handle-shift-selection))
...blabla...))
-- Stefan
- Re: Interactive hat., (continued)
Re: Interactive hat., Stefan Monnier, 2009/03/25
Re: Interactive hat. [Was: CUA-like stuff spuriously enables transient-mark-mode], Juanma Barranquero, 2009/03/25
- Re: Interactive hat., Chong Yidong, 2009/03/25
- Re: Interactive hat. [Was: CUA-like stuff spuriously enables transient-mark-mode], Alan Mackenzie, 2009/03/25
- Re: Interactive hat. [Was: CUA-like stuff spuriously enables transient-mark-mode], Juanma Barranquero, 2009/03/25
- Re: Interactive hat. [Was: CUA-like stuff spuriously enables transient-mark-mode], Alan Mackenzie, 2009/03/26
- Re: Interactive hat., Stefan Monnier, 2009/03/26
- Re: Interactive hat., Alan Mackenzie, 2009/03/26
- Re: Interactive hat.,
Stefan Monnier <=
- Re: Interactive hat., Alan Mackenzie, 2009/03/26
- Re: Interactive hat., Stefan Monnier, 2009/03/26
- Re: Interactive hat., Johan Bockgård, 2009/03/26
- Re: Interactive hat., Alan Mackenzie, 2009/03/26
- Re: Interactive hat., Alan Mackenzie, 2009/03/26
- Re: Interactive hat., Stefan Monnier, 2009/03/26
- Re: Interactive hat., Alan Mackenzie, 2009/03/27