From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matt Price Newsgroups: gmane.emacs.help Subject: Re: basic help evaluating function in an alist Date: Tue, 4 Dec 2012 09:41:46 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1354632132 15616 80.91.229.3 (4 Dec 2012 14:42:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2012 14:42:12 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 04 15:42:25 2012 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 1TfthY-00006i-5f for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 15:42:24 +0100 Original-Received: from localhost ([::1]:36344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfthM-00016W-EP for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 09:42:12 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfth8-00015v-By for help-gnu-emacs@gnu.org; Tue, 04 Dec 2012 09:42:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tftgy-0002Ru-Ki for help-gnu-emacs@gnu.org; Tue, 04 Dec 2012 09:41:58 -0500 Original-Received: from mail-qa0-f41.google.com ([209.85.216.41]:56886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tftgy-0002Rm-DO for help-gnu-emacs@gnu.org; Tue, 04 Dec 2012 09:41:48 -0500 Original-Received: by mail-qa0-f41.google.com with SMTP id o19so1099361qap.0 for ; Tue, 04 Dec 2012 06:41:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xafeJQeScBeC9BJozAmqCT8VNi8MxNYJ6U7xQUyJUpI=; b=P33ZsDVoEDjeqLxRdaYt1SXwtJRJn3MuRcNiewBgWJxqc7A821k4pSFKqqgd54fr8U q1QCmQWIrvGoc3nk8wfgihA1oPn0YZfCSSGltbesqj/iWx0iJt8aDopuiWawudQDs10d m6cQAgArPo4D8bNmvWaHaZcY8JxbGoFUw8hy+RsjvtEfslTFUn6+nea1MTFeBZPSviL5 y61xnuKjaueQR2B4UdwJgUOfRDhdC1uKBLzFPRCcRnwYdKRa5128jAktOqIwQtg2TNbR Ma5xQSEnj6OyLI3XTAbu6YAQr09ID4TEp4djLmfO929Xu5gVgr+TjUtBn40BYjoIgcHg EH9Q== Original-Received: by 10.224.220.143 with SMTP id hy15mr23310144qab.63.1354632106906; Tue, 04 Dec 2012 06:41:46 -0800 (PST) Original-Received: by 10.49.132.169 with HTTP; Tue, 4 Dec 2012 06:41:46 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.216.41 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:88039 Archived-At: On Sat, Dec 1, 2012 at 10:44 PM, Drew Adams wrote: >> > '(guide . (selected-window)) >> > >> > (cons 'guide (selected-window)) >> >> I still don't quite understand what it is in the >> syntax that causes the function (selected-window) to be evaluated in >> one case and not the other > > In the first case, the dotted pair `(guide . (selected-window))' is quoted. > When evaluated, the sexp `(quote (guide . (selected-window)))' returns that > dotted pair: `(guide . (selected-window))'. `quote' returns its argument > without evaluating it. > > In the second case, the sexp `(cons 'guide (selected-window))' is evaluated, > which means applying function `cons' to its two arguments, after evaluating each > of them. > > Evaluation of the first argument, which is `(quote guide)', returns the symbol > `guide'. Evaluation of the second arg, `(selected-window)', returns the > selected window. Function `cons' then creates a cons cell whose car is the > symbol `guide' and whose cdr is that window. > Drew, I forgot to write and say thank you. this was a big help. matt