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 1169584860 1216 80.91.229.12 (23 Jan 2007 20:41:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Jan 2007 20:41:00 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 23 21:40:58 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 1H9SRu-0000E9-C1 for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Jan 2007 21:40:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9SRt-0008Nw-V6 for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Jan 2007 15:40:57 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!news.germany.com!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: p54be897f.dip0.t-ipconnect.de Original-X-Trace: online.de 1169583340 31544 84.190.137.127 (23 Jan 2007 20:15:40 GMT) Original-X-Complaints-To: abuse@einsundeins.com Original-NNTP-Posting-Date: Tue, 23 Jan 2007 20:15:40 +0000 (UTC) User-Agent: KNode/0.9.2 Original-Xref: shelby.stanford.edu gnu.emacs.help:144959 Original-To: help-gnu-emacs@gnu.org 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:40563 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