help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: elisp: how to pass a list argument to defun


From: Tassilo Horn
Subject: Re: elisp: how to pass a list argument to defun
Date: Wed, 28 Jun 2006 12:03:37 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

"lalit mohan tripathi" <lalit.tripathi@gmail.com> writes:

Hi!

> (defun process-list-fn (list02, a, b, c)
>   "This function prints the list02, a, b, c."
>   (print list02)
>   (print a)
>   (print b)
>   (print c))
>
> (setq list01 '("abc" "def" "xyz"))
> (process-list-fn list01 10 20 30)
>
> But I get the following error:
>
> Debugger entered--Lisp error: (void-variable list02)

Lisp doesn't know the variable `list02', but it knows `list02,'. ;-)

In Lisp you don't separate the parameters with comma. Remove them and
you'll be fine.

Bye,
Tassilo
-- 
VI VI VI - The Roman Number Of The Beast


reply via email to

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