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: Patch for fields of `struct buffer' Date: Mon, 14 Feb 2011 12:47:50 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297705791 16319 80.91.229.12 (14 Feb 2011 17:49:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 Feb 2011 17:49:51 +0000 (UTC) Cc: tromey@redhat.com, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 14 18:49:45 2011 Return-path: Envelope-to: ged-emacs-devel@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 1Pp2YQ-000624-Gl for ged-emacs-devel@m.gmane.org; Mon, 14 Feb 2011 18:49:44 +0100 Original-Received: from localhost ([127.0.0.1]:59163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pp2YP-000663-4y for ged-emacs-devel@m.gmane.org; Mon, 14 Feb 2011 12:49:41 -0500 Original-Received: from [140.186.70.92] (port=45383 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pp2Wf-0005EL-7C for emacs-devel@gnu.org; Mon, 14 Feb 2011 12:47:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pp2Wd-0000RO-VW for emacs-devel@gnu.org; Mon, 14 Feb 2011 12:47:52 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:47511 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pp2Wd-0000RH-S1; Mon, 14 Feb 2011 12:47:51 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An0GANv5WE1MCqmX/2dsb2JhbACXbY4ddLtKhV4EhQSPOQ X-IronPort-AV: E=Sophos;i="4.60,469,1291611600"; d="scan'208";a="91692186" Original-Received: from 76-10-169-151.dsl.teksavvy.com (HELO ceviche.home) ([76.10.169.151]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 14 Feb 2011 12:47:50 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id BAFA366188; Mon, 14 Feb 2011 12:47:50 -0500 (EST) In-Reply-To: (Richard Stallman's message of "Sun, 13 Feb 2011 14:01:23 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136009 Archived-At: > I also expect some really nasty cases showing up when you try to rewind > a thread's bindings. E.g. if a let-binding that was originally applied > to a global variable has to be rewound (i.e. re-applied) to a variable > that has become buffer-local in the mean time. > This issue arises now within the single Emacs thread, and we already > handle it. Not really, because we never rewind, we only unwind. We do have to solve related problems when unwinding, and indeed it is tricky and has suffered from very long standing bugs. > I don't recall just how we do, but we hardly ever get a complaint > about it. Gerd fixed in Emacs-21 a bug that was known for a long time (when you sometimes had to do (let (blbla) (save-current-buffer ...)) to make sure that the unwinding would take place in the same buffer as when the vars were bound). Since then I've fixed another related bug in some less common case, and someone else (can't remember who right now, Lennart maybe?) found a third one (between Emacs-22 and 23). For this last bug, I tried to do a "thorough code review" to try and convince myself that we really did get it right this time, but I wouldn't bet my life on it. AFAIK, none of those 3 bugs were related to new features, so getting dynamic let-bindings to work right in the presence of buffer-local variables has taken in the order of what ... 20 years? Stefan