From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: cstacy@news.dtpq.com (Christopher C. Stacy) Newsgroups: gmane.emacs.help Subject: Re: Structured data in Emacs Lisp Date: Mon, 09 May 2005 21:39:01 GMT Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115674875 17922 80.91.229.2 (9 May 2005 21:41:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 May 2005 21:41:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 09 23:41:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DVFze-0002J1-S5 for geh-help-gnu-emacs@m.gmane.org; Mon, 09 May 2005 23:40:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DVG83-0001PX-Kt for geh-help-gnu-emacs@m.gmane.org; Mon, 09 May 2005 17:49:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!canoe.uoregon.edu!cyclone1.gnilink.net!spamkiller.gnilink.net!gnilink.net!trnddc09.POSTED!8b1f9295!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-NNTP-Posting-Host: 68.163.210.184 Original-X-Complaints-To: abuse@verizon.net Original-X-Trace: trnddc09 1115674741 68.163.210.184 (Mon, 09 May 2005 17:39:01 EDT) Original-NNTP-Posting-Date: Mon, 09 May 2005 17:39:01 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:130807 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:26462 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26462 PT writes: > For example, from a function I want to return three values. > How should I do this? > Using a list? (Value1 Value2 Value3)? > Or maybe an association list? '((value1 . 3) (value2 . 4) (value3 . 5)) > Or is there an other Lispish way to handle structured > data I don't know about? This isn't going to help with your Emacs problem, but just so you know: Emacs Lisp is a very simple kind of Lisp, lacking many features present in most modern (post-1979) dialects of Lisp. For example, in ANSI Common Lisp, you can directly pass mutiple values around without packing them into some kind of container. And for representing structured data, you can use either structs or object-oriented programming. There are of course many other data types and a zillion other important features in "real" Lisp that Emacs Lisp doesn't have. I'm telling you this because you asked for a "Lispy" way to do things. I think the "CL" library in Emacs Lisp might give you some version of DEFSTRUCT, which is something like the one in Common Lisp.