On Thu, 15 Mar 2001, Tom Roche wrote:
>>>> What am I doing wrong?
Daniel Pittman <[EMAIL PROTECTED]> 16 Mar 2001 10:48:11 +1100
>>> Add an `interactive' form to the top of the function.
<[EMAIL PROTECTED]> Thu, 15 Mar 2001 19:06:25 -0500
>> Actually, I had tried that. If I do
>> (define-key global-map "\M-`"
>> (interactive)
>> (lambda (&optional arg)
>> (if (tramp-tramp-file-p buffer-file-name)
>> 'tramp-compile
>> 'compile
>> )
>> )
>> )
>> I get
>> Wrong number of arguments: #<subr define-key>, 4
>> and if I do
>> (define-key global-map "\M-`"
>> (lambda (&optional arg)
>> (interactive)
>> (if (tramp-tramp-file-p buffer-file-name)
>> 'tramp-compile
>> 'compile
>> )
>> )
>> )
>> I get nothing at all (including no error, even with debug-on-error
>> t).
Daniel Pittman <[EMAIL PROTECTED]> 16 Mar 2001 11:18:38 +1100
> You want:
> (define-key global-map "\M-`"
> (lambda (&optional arg)
> (interactive)
> (if (tramp-tramp-file-p buffer-file-name)
> 'tramp-compile
> 'compile
> )
> )
> )
Umm ... I tried that. Is there a typo?
I can eval the above, checking to see that the key bound (it has). But
if I try to use the key, nothing happens.
TIA, [EMAIL PROTECTED]