emacs-devel
[Top][All Lists]
Advanced

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

Re: File modes facilities.


From: Kim F. Storm
Subject: Re: File modes facilities.
Date: Tue, 25 Oct 2005 00:14:10 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Below is a _much_better_ patch which allows ANY function to have its
>> interactive specification overridden, and consequently you can make
>> any function into a command.
>
> Indeed, this is much better.
> The only problem I still see with it is that it interacts poorly
> with aliases.

Given your examples, I'd say that it's a feature rather than
a bug :-)

But admittedly, I didn't think about aliases.  But there is a way to
get the best of both approaches:

Suppose A is an alias for C.

Now, if A has overriding interactive spec, use that.
Else if C has overriding interactive spec, use that.
Else use original interactive spec for C (if any).

So this would actually work:

>     (defalias 'load-library 'load "docstring")
>     (defalias 'load-file 'load "other docstring")
>     (put 'load-library 'interactive '(...))
>     (put 'load-file 'interactive '(...))

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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