unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tassilo Horn <heimdall@uni-koblenz.de>
Subject: Re: elisp: how to pass a list argument to defun
Date: Wed, 28 Jun 2006 12:03:37 +0200	[thread overview]
Message-ID: <87r719tx52.fsf@baldur.nicundtas.de> (raw)
In-Reply-To: mailman.3433.1151487404.9609.help-gnu-emacs@gnu.org

"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	other threads:[~2006-06-28 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.3433.1151487404.9609.help-gnu-emacs@gnu.org>
2006-06-28 10:03 ` Tassilo Horn [this message]
2006-06-28 13:55 ` elisp: how to pass a list argument to defun Pascal Bourguignon
2006-06-28 20:59 ` Le Wang
2006-06-28  9:36 lalit mohan tripathi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r719tx52.fsf@baldur.nicundtas.de \
    --to=heimdall@uni-koblenz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).