From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.devel Subject: Re: Possible defvar bug Date: Mon, 18 Feb 2013 20:17:35 +0530 Message-ID: <87obfhy8zc.fsf@gmail.com> References: <87d2vxr8h6.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361198894 20135 80.91.229.3 (18 Feb 2013 14:48:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Feb 2013 14:48:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 18 15:48:35 2013 Return-path: Envelope-to: ged-emacs-devel@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 1U7S1D-0002xS-AP for ged-emacs-devel@m.gmane.org; Mon, 18 Feb 2013 15:48:35 +0100 Original-Received: from localhost ([::1]:35881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7S0q-0006Im-Nh for ged-emacs-devel@m.gmane.org; Mon, 18 Feb 2013 09:48:12 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7S0l-0006Hs-Pu for emacs-devel@gnu.org; Mon, 18 Feb 2013 09:48:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7S0f-00041z-Hh for emacs-devel@gnu.org; Mon, 18 Feb 2013 09:48:07 -0500 Original-Received: from mail-pa0-f52.google.com ([209.85.220.52]:49930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7S0f-00041s-CK for emacs-devel@gnu.org; Mon, 18 Feb 2013 09:48:01 -0500 Original-Received: by mail-pa0-f52.google.com with SMTP id fb1so2821058pad.11 for ; Mon, 18 Feb 2013 06:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=AljsPK0a9DF31JPUhCWK03h1mOTA4CiiSh29kBvvxkY=; b=aDhb/FOQ7iFQi5Lm9qnSFQCf8jyj7akcnJjf/nIkYEhr4/zMvKO8eyi6f+FyeuRRFj f2IwcpVH/alA3l5m+96HL4uzEcnTalURtCp1ATLJ4W8pNgkZ8lBtWRm2duJqw5uX4Yxf faYsfQguBW39qa6gSQ+r4ETmJCIWSvQJscvWV7Na5gdUUz/vrcF6RNYTxjviHrXC0geG MzgNpsxBgVCTIwtle5H5eI3NN2lxTSPuytO9HoQ9c8VJkXx5o46EX15bturZMNcH3Owr zGL2nIPPnvJ06eoeGc+qh69mKYNECAkibbjWasZoWqGW9Yo6w8aMGbEi6gpxPsZtjUkQ rIGg== X-Received: by 10.68.213.66 with SMTP id nq2mr30580326pbc.29.1361198880258; Mon, 18 Feb 2013 06:48:00 -0800 (PST) Original-Received: from debian-6.05 ([101.63.131.222]) by mx.google.com with ESMTPS id rr14sm4528629pbb.34.2013.02.18.06.47.57 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 18 Feb 2013 06:47:59 -0800 (PST) In-Reply-To: <87d2vxr8h6.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Mon, 18 Feb 2013 15:40:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.220.52 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157128 Archived-At: The documentation of `defvar' has the following paragraphs. I am certain I don't understand what these paragraphs mean, particularly the second one. Just throwing my hat, to see where it lands. ,---- C-h f | The optional argument INITVALUE is evaluated, and used to set SYMBOL, | only if SYMBOL's value is void. If SYMBOL is buffer-local, its | default value is what is set; buffer-local values are not affected. | If INITVALUE is missing, SYMBOL's value is not set. | | If SYMBOL has a local binding, then this form affects the local | binding. This is usually not what you want. Thus, if you need to | load a file defining variables, with this form or with `defconst' or | `defcustom', you should always load that file _outside_ any bindings | for these variables. (`defconst' and `defcustom' behave similarly in | this respect.) `---- Tassilo Horn writes: > Hi all, > > I have a problem in AUCTeX where I get some void-variable error although > I require the file defining the variable. After some experimenting, > I've isolated the problem to this minimal example: > > (let ((crm-separator ",")) > (require 'crm)) > > crm.el defines `crm-separator' with some default value. However, when > evaluating that snipped, I get: > > ,----[ C-h v crm-separator ] > | crm-separator is a variable defined in `crm.el'. > | It is void as a variable. > | > | Documentation: > | Separator regexp used for separating strings in `completing-read-multiple'. > | It should be a regexp that does not match the list of completion candidates. > | Modify this value to make `completing-read-multiple' use a separator other > | than `crm-default-separator'. > `---- > > I understand that defvar doesn't override a variable's value if the > variable is already defined, but is that TRT with dynamic bindings, too? > > Bye, > Tassilo > > --