From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Problem understanding set-register syntax Date: Mon, 6 Dec 2010 14:54:46 -0800 Message-ID: <9BE7E059B1D0401E84DF5921BF765AA4@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291676189 10355 80.91.229.12 (6 Dec 2010 22:56:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Dec 2010 22:56:29 +0000 (UTC) To: "=?iso-8859-1?Q?'Aur=E9lien_Bottazzini'?=" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 06 23:56:24 2010 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.69) (envelope-from ) id 1PPjyp-0001TH-OL for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Dec 2010 23:56:23 +0100 Original-Received: from localhost ([127.0.0.1]:48604 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPjyp-00064V-7H for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Dec 2010 17:56:23 -0500 Original-Received: from [140.186.70.92] (port=57627 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPjyN-0005yt-1f for help-gnu-emacs@gnu.org; Mon, 06 Dec 2010 17:55:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPjyM-0006sZ-0O for help-gnu-emacs@gnu.org; Mon, 06 Dec 2010 17:55:54 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:58860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPjyL-0006sT-QK for help-gnu-emacs@gnu.org; Mon, 06 Dec 2010 17:55:53 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oB6Mtphp015033 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 Dec 2010 22:55:52 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oB6ICu3l023127; Mon, 6 Dec 2010 22:55:50 GMT Original-Received: from abhmt015.oracle.com by acsmt354.oracle.com with ESMTP id 849504391291676086; Mon, 06 Dec 2010 14:54:46 -0800 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 06 Dec 2010 14:54:46 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcuVjuM1dgaGt1a5QruHqBKEZOSLgQAADCewAAHm4AA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:75525 Archived-At: > > Why can't I just use: > > (set-register i '(file . "~/.emacs.d/init.el")) > > ; will say Symbol's value as variable is void:i > > Because the first argument to `set-register' is a register > name, which is a character, and `?i' is the Lisp syntax for > the character `i'. I should also have mentioned that using just i, without quoting it (i.e., 'i) causes the symbol i to be evaluated. And since the symbol i has no value here (no global value) you get the error message saying that its value is void. Some symbols, such as t and nil (and all keywords, such as :foobar) are self-evaluating, meaning that they act just like variables whose values are the symbols themselves. You do not need to quote self-evaluating symbols in an evaluation context. Other symbols (e.g. i, foobar) you do need to quote, if you want not the value of the symbol (e.g. it might not have a value) but the symbol itself. But all characters are self-evaluating, so ?i evaluates to ?i. See the Emacs manual, node `Init Syntax'. See the Elisp manual, node `Basic Char Syntax'. (Use `g' in Info to go to a particular node.)