On Thu, 15 Mar 2001, Tom Roche wrote:
>> ? How to make a key binding tramp-aware? Do I need to?
[EMAIL PROTECTED] 15 Mar 2001 23:21:06 +0100
> Oh. Well, write a little function which checks whether the current
> file is a tramp file and then calls either compile or
> tramp-compile...
> The magic function (to determine whether a file name is a Tramp file
> name) is tramp-tramp-file-p, I think.
Urgghh ... this highlights my elisp deficiency. I've done several
variations on
;; "Use 'tramp-compile' if in a tramp buffer, 'compile' otherwise."
(define-key global-map "\M-`"
(lambda (&optional arg)
(if (tramp-tramp-file-p buffer-file-name)
'tramp-compile
'quote compile
)
)
)
none of which work: the current error is
> Wrong type argument: commandp, (lambda (&optional arg) (if
> (tramp-tramp-file-p buffer-file-name) (quote tramp-compile)
> (quote compile)))
What am I doing wrong?
TIA, [EMAIL PROTECTED]