[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [h-e-w] Help with defadvice
From: |
Jeff Paquette |
Subject: |
RE: [h-e-w] Help with defadvice |
Date: |
Thu, 19 Jun 2003 13:30:26 -0400 |
My elisp is not so good either, but as far as I know, apply breaks a list
apart into separate items, calling the function with the "spread" list as
arguments, while concat does not accept a list:
(apply 'concat '("this " "is " "a " "test"))
"this is a test"
(concat '("this " "is " "a " "test"))
Debugger entered--Lisp error: (wrong-type-argument integerp "this ")
concat(("this " "is " "a " "test"))
eval((concat (quote ("this " "is " "a " "test"))))
eval-last-sexp-1(t)
eval-last-sexp(t)
eval-print-last-sexp()
* call-interactively(eval-print-last-sexp)
If you break the list apart and pass each element as an argument:
(concat "this " "is " "a " "test")
"this is a test"
So my guess is that you need the apply call to handle the list of arguments.
--
Jeff Paquette direct: (508) 616-4526
Principal Software Engineer email: address@hidden
NuGenesis Technologies Corp. web: http://www.nugenesis.com
-----Original Message-----
From: Michael R. Wolf [mailto:address@hidden
Sent: Thursday, June 19, 2003 1:11 PM
To: address@hidden
Subject: Re: [h-e-w] Help with defadvice
Jeff Paquette <address@hidden> writes:
> Whoops, it's
>
> (defun run-perl (&rest stmts)
> (call-process "perl" nil nil nil "-e" (apply 'concat stmts)))
I don't understand elisp enough (I'm a Perl Evangelist) to know why
these are different. Could you help?
(apply 'concat stmts)
(concat stmts)
I like the idea of using a 'here file' in elsip to escape into Perl!!!
My Perl is much better than my elsip.
Thanks,
Michael Wolf
--
Michael R. Wolf
All mammals learn by playing!
address@hidden
- dired-execute-file [was Re: [h-e-w] Help with defadvice], (continued)
RE: [h-e-w] Help with defadvice, Jeff Paquette, 2003/06/19
RE: [h-e-w] Help with defadvice, Jeff Paquette, 2003/06/19
RE: [h-e-w] Help with defadvice, Gallucci, David, 2003/06/19
RE: [h-e-w] Help with defadvice,
Jeff Paquette <=