From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: About `read' Date: Fri, 04 Jan 2013 15:44:16 +0200 Message-ID: <87y5g9awr3.fsf@mithlond.arda> References: <20130104213503.530b5f96a381422f2fbb6d6b@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1357307075 17768 80.91.229.3 (4 Jan 2013 13:44:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Jan 2013 13:44:35 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xue Fuqiao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 04 14:44:51 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tr7Zr-0005f9-FB for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Jan 2013 14:44:51 +0100 Original-Received: from localhost ([::1]:51259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tr7Zc-0004AS-7F for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Jan 2013 08:44:36 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tr7ZU-0004AJ-FJ for help-gnu-emacs@gnu.org; Fri, 04 Jan 2013 08:44:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tr7ZS-0003NQ-1F for help-gnu-emacs@gnu.org; Fri, 04 Jan 2013 08:44:28 -0500 Original-Received: from mta-out.inet.fi ([195.156.147.13]:35427 helo=jenni2.inet.fi) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tr7ZR-0003J4-MP for help-gnu-emacs@gnu.org; Fri, 04 Jan 2013 08:44:25 -0500 Original-Received: from mithlond.arda (84.251.134.110) by jenni2.inet.fi (8.5.140.03) id 50871399049AA3BE; Fri, 4 Jan 2013 15:44:17 +0200 Original-Received: from dtw by mithlond.arda with local (Exim 4.72) (envelope-from ) id 1Tr7ZJ-00022h-1T; Fri, 04 Jan 2013 15:44:17 +0200 In-Reply-To: <20130104213503.530b5f96a381422f2fbb6d6b@gmail.com> (Xue Fuqiao's message of "Fri, 4 Jan 2013 21:35:03 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 195.156.147.13 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88439 Archived-At: Xue Fuqiao [2013-01-04 21:35:03 +0800] wrote: > I have a question about read: > > (read "(I am) xfq") > =>(I am) > > (read "I am xfq") > =>I > > Why are they different? When does `read' skip whitespace characters? Function READ reads one Lisp expression. In your first example the first expression is a list of two symbols. In the second example the first expression is symbol named "I". read is a built-in function in `C source code'. (read &optional STREAM) Read one Lisp expression as text from STREAM, return as Lisp object. If STREAM is nil, use the value of `standard-input' (which see). STREAM or the value of `standard-input' may be: a buffer (read from point and advance it) a marker (read from where it points and advance it) a function (call it with no arguments for each character, call it with a char as argument to push a char back) a string (takes text from string, starting at the beginning) t (read text line using minibuffer and use it, or read from standard input in batch mode).