From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: conditionals in elisp Date: Wed, 28 Oct 2009 15:05:35 +0100 Organization: Organization?!? Message-ID: <87my3bvck0.fsf@lola.goethe.zz> References: <87aazdunrb.fsf@galatea.local> <87skd5t3vp.fsf@galatea.local> <87eioou1im.fsf@galatea.local> <8763a0tu93.fsf@galatea.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1256741151 18484 80.91.229.12 (28 Oct 2009 14:45:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2009 14:45: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 Wed Oct 28 15:45:44 2009 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 1N39mO-0003AG-Bq for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Oct 2009 15:45:40 +0100 Original-Received: from localhost ([127.0.0.1]:47402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N39mN-00017V-M0 for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Oct 2009 10:45:39 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!newsfeed.tiscali.ch!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:5jQsSKfcIIIvsVWSFh8RVAksPhg= Original-Lines: 48 Original-NNTP-Posting-Date: 28 Oct 2009 15:05:37 CET Original-NNTP-Posting-Host: c611b25d.newsspool4.arcor-online.net Original-X-Trace: DXC=OXcmki^m; H@lU`@c^jLCbJ4IUK5MOK` 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:69306 Archived-At: pjb@informatimago.com (Pascal J. Bourguignon) writes: > Ok. It's quite simple really. > Here the 5-minute all you need to know about lisp: > > > There are two kinds of data: > > - atoms, and > - lists. Actually, conses. > Atoms are numbers of various sort such as: 123 1.23 1.2e.3, vectors > such as [1 2 3], strings such as "abc", and other kind of objects such > as functions, predefined data structures (eg. hash-tables), or user > defined structures or objects, and symbols such as: foo print if > what-a-nice-day, +, -, etc, that are used to name the various things > such as variables or functions. (Symbol can contain mostly any > character that wouldn't be interpreted as another kind of atom or > list, including spaces (just escape them with \)). You forgot the atom nil which is also a list, though not a cons. > Lists are sequences of data enclosed in parentheses: > > (a list containing only symbols) > (a list containing (a sub list)) > (1 list containing 2 numbers and a "string") Lists are nil or a cons... Data enclosed in parentheses is a shortcut for a certain kind of conses. (cons 1 (cons 2 (cons 3 nil))) is short for (list 1 2 3). > All the rest is rather accidental, it could be different, and it would > still be lisp. It may change from one kind of lisp to another too > (emacs lisp, Common Lisp, ISO-Lisp, Scheme, and older variants). Scheme is quite different: in Lisp, a symbol has a name, a property list, a value cell, a function cell. In Scheme, there are just name and value cell, and I am not sure that the name leads as much a life of its own as in Lisp. -- David Kastrup