From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Roehler Newsgroups: gmane.emacs.help Subject: Re: Newbie: references in elisp Date: Tue, 23 Jan 2007 21:24:59 +0100 Organization: 1&1 Internet AG Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: sea.gmane.org 1169746851 17857 80.91.229.12 (25 Jan 2007 17:40:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 25 Jan 2007 17:40:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 25 18:40:35 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HA8aK-0007pG-7z for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Jan 2007 18:40:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HA8aJ-0007hq-Qe for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Jan 2007 12:40:27 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: p54bec1d1.dip0.t-ipconnect.de Original-X-Trace: online.de 1169746695 26500 84.190.193.209 (25 Jan 2007 17:38:15 GMT) Original-X-Complaints-To: abuse@einsundeins.com Original-NNTP-Posting-Date: Thu, 25 Jan 2007 17:38:15 +0000 (UTC) User-Agent: KNode/0.9.2 Original-Xref: shelby.stanford.edu gnu.emacs.help:145043 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40646 Archived-At: Pawel wrote: > Hallo group members! > I want my function return one than one element. I C I do it > using references. Is there something like reference in elisp? > .. or maybe I should use lists with some additional trick? > > regards > Pawel ;; Just one possibility: (setq my-list '("a" "b" "c")) (car my-list) => "a" (defun one-by-one (my-list) "This is an example" (let ((many my-list)) (while many (insert (car many)) (setq many (cdr many))))) (one-by-one my-list) => abc __ Andreas Roehler