Kai> I just look at the indentation to see the structure.
Seems like you'd like Python... ;-)
S
> works for me, and seems even cleaner. (Except for the paren placement:
> being usually procedural I like starts and ends to line up :-)
There are coding conventions in most/all languages. It's usually considered
good practice to follow them, even if your habits disagree at first.
Ste
On Fri, 16 Mar 2001, Tom Roche wrote:
> works for me, and seems even cleaner. (Except for the paren
> placement: being usually procedural I like starts and ends to line
> up :-)
I fail to see why people want to do this parens thing. Whoever looks
at them?
I just look at the indentation to see
"Stefan Monnier" <[EMAIL PROTECTED]>
16 Mar 2001 09:50:19 -0500
> (define-key global-map "\M-`"
>(lambda ()
> "Use `tramp-compile' if in a tramp buffer, `compile' otherwise."
> (interactive)
> (call-interactively
> (if (tramp-tramp-file-p buffer-file-name)
> 'tr
> "Daniel" == Daniel Pittman <[EMAIL PROTECTED]> writes:
> Point of view, really. &rest accepts zero or more arguments, &optional
> accepts zero or one. It makes little difference if you only ignore them.
But since the argument is ignored and since no argument is passed when
used interactivel
On Thu, 15 Mar 2001, Tom Roche wrote:
> Daniel Pittman <[EMAIL PROTECTED]> 6 Mar 2001 14:50:35 +1100
>> Try this for size, it /should/ work (with your key-binging, not mine
>> :):
>
>> (define-key global-map [(control f10)]
>> (lambda (&rest args)
>
> I _knew_ there was a better way
Daniel Pittman <[EMAIL PROTECTED]> 6 Mar 2001 14:50:35 +1100
> Try this for size, it /should/ work (with your key-binging, not mine
> :):
> (define-key global-map [(control f10)]
> (lambda (&rest args)
I _knew_ there was a better way than &optional ...
> (interactive)
On Thu, 15 Mar 2001, Tom Roche wrote:
> Daniel Pittman <[EMAIL PROTECTED]> 16 Mar 2001 13:47:29 +1100
>>> So, you need to pass arg from your lambda to `compile'. :)
>
> <[EMAIL PROTECTED]> Thu, 15 Mar 2001 22:19:32 -0500
>> Hey, no linenoise! But the signature of compile is
>
>> (defun compile (
On Thu, 15 Mar 2001, Tom Roche wrote:
> Daniel Pittman <[EMAIL PROTECTED]> 16 Mar 2001 11:18:38 +1100
So, rather than doing (if ... 'tramp-compile 'compile), run the
command you want, so:
>
(if ... (tramp-compile) (compile))
>
> On Thu, 15 Mar 2001, Tom Roche wrote:
>>> I get nois
Daniel Pittman <[EMAIL PROTECTED]> 16 Mar 2001 13:47:29 +1100
>> So, you need to pass arg from your lambda to `compile'. :)
<[EMAIL PROTECTED]> Thu, 15 Mar 2001 22:19:32 -0500
> Hey, no linenoise! But the signature of compile is
> (defun compile (command)
> So how to get 'command to them?
Chan
Daniel Pittman <[EMAIL PROTECTED]> 16 Mar 2001 11:18:38 +1100
>>> So, rather than doing (if ... 'tramp-compile 'compile), run the
>>> command you want, so:
>>> (if ... (tramp-compile) (compile))
On Thu, 15 Mar 2001, Tom Roche wrote:
>> I get noise in *Messages* (broken for mail):
Daniel Pittma
On Thu, 15 Mar 2001, Tom Roche wrote:
> 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
[EMAIL PROTECTED] Thu, 15 Mar 2001 21:16:12 -0500
> So I delete tramp-util.elc (hoping to avoid bytecode), start another
> emacs with -debug-init, eval it again, and run it again: I get
> (broken for mail)
> *Backtrace*
> Signaling: (wrong-number-of-arguments #[(command) "^H^QÃ ?Ä\"Å
> Æ\"" [co
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 ...
On Thu, 15 Mar 2001, Tom Roche wrote:
> On Thu, 15 Mar 2001, Tom Roche wrote:
> What am I doing wrong?
[...]
> Daniel Pittman <[EMAIL PROTECTED]> 16 Mar 2001 11:18:38 +1100
>> You want:
>
>> (define-key global-map "\M-`"
>> (lambda (&optional arg)
>> (interactive)
>> (if (tramp-tr
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 glo
On Thu, 15 Mar 2001, Tom Roche wrote:
> On Thu, 15 Mar 2001, Tom Roche wrote:
[...]
> Daniel Pittman <[EMAIL PROTECTED]> 16 Mar 2001 10:48:11 +1100
>> Trying to bind a function that isn't interactive to a key sequence.
>> Add an `interactive' form to the top of the function.
>
> Actually, I had
On Thu, 15 Mar 2001, Tom Roche wrote:
>> I've done several variations on
>>> (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 curr
On Thu, 15 Mar 2001, Tom Roche wrote:
[...]
> 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 buffe
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
20 matches
Mail list logo