From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Evil defvars in org.el Date: Fri, 04 May 2012 20:37:27 -0400 Message-ID: References: <87k411g8xa.fsf@gnu.org> <877gx1pv19.fsf@gnu.org> <87vckls01f.fsf@gnu.org> <77ehr96ty6.fsf@fencepost.gnu.org> <874ns4sidf.fsf@gnu.org> <0u1un0cu4b.fsf@fencepost.gnu.org> <87wr4rk6rr.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1336178257 23662 80.91.229.3 (5 May 2012 00:37:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 5 May 2012 00:37:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 05 02:37:35 2012 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 1SQT0B-000070-2b for ged-emacs-devel@m.gmane.org; Sat, 05 May 2012 02:37:35 +0200 Original-Received: from localhost ([::1]:56063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQT0A-0004CD-El for ged-emacs-devel@m.gmane.org; Fri, 04 May 2012 20:37:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQT07-0004C8-8V for emacs-devel@gnu.org; Fri, 04 May 2012 20:37:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQT05-0006qU-Jx for emacs-devel@gnu.org; Fri, 04 May 2012 20:37:30 -0400 Original-Received: from ironport-out.teksavvy.com ([206.248.143.162]:25561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQT05-0006qI-FX for emacs-devel@gnu.org; Fri, 04 May 2012 20:37:29 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUIACxOgk9MCqD5/2dsb2JhbABDuCMDgQyBCIIJAQEEAVYzCzQSFBgNUoduBbYyi2GBVYMkBKRFgV2DAw X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="178426933" Original-Received: from 76-10-160-249.dsl.teksavvy.com (HELO ceviche.home) ([76.10.160.249]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 May 2012 20:37:28 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id BA59666109; Fri, 4 May 2012 20:37:27 -0400 (EDT) In-Reply-To: <87wr4rk6rr.fsf@gnu.org> ("Johan =?iso-8859-1?Q?Bockg=E5rd=22?= =?iso-8859-1?Q?'s?= message of "Fri, 04 May 2012 22:53:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.143.162 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:150262 Archived-At: >>> It seems to me that this is something where there really ought to be >>> a general Emacs solution (dynamic-let or whatever). >> There is such a thing: (defvar ). > It currently has a number of problems: > - The scoping of defvar is unclear and changes when the code is > compiled: Indeed, the rules aren't quite the same, which is one of the reasons why I prefer not to document them. Basically the rule is "leave them at top-level", which should work just fine in 99.9% of the situations. > - Invalid byte code is generated when the same symbol is used as both a > lexical and a dynamic variable: That one is a bug. Stefan