From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Effect of deletions on indirect buffers (Bug#8219) Date: Sun, 13 Mar 2011 18:29:01 -0400 Message-ID: <87wrk2vemq.fsf@stupidchicken.com> References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> <83wrk4soee.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300055362 19523 80.91.229.12 (13 Mar 2011 22:29:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 13 Mar 2011 22:29:22 +0000 (UTC) Cc: Eli Zaretskii , 8219@debbugs.gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 13 23:29:17 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 1Pytml-0002Lt-RV for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2011 23:29:16 +0100 Original-Received: from localhost ([127.0.0.1]:37983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pytml-0007YS-3P for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2011 18:29:15 -0400 Original-Received: from [140.186.70.92] (port=48316 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pytmf-0007Vj-R5 for emacs-devel@gnu.org; Sun, 13 Mar 2011 18:29:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pytme-00062F-5a for emacs-devel@gnu.org; Sun, 13 Mar 2011 18:29:09 -0400 Original-Received: from vm-emlprdomr-03.its.yale.edu ([130.132.50.144]:41075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pytme-000620-2K; Sun, 13 Mar 2011 18:29:08 -0400 Original-Received: from furball ([64.134.240.221]) (authenticated bits=0) by vm-emlprdomr-03.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2DMT0O8009193 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 13 Mar 2011 18:29:00 -0400 Original-Received: by furball (Postfix, from userid 1000) id EC45516066A; Sun, 13 Mar 2011 18:29:01 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Sat, 12 Mar 2011 15:47:05 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.144 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.144 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:137202 Archived-At: Stefan Monnier writes: > /* !!!FIXME: all the BUF_BEGV/BUF_ZV/BUF_PT macros are flawed: > on indirect (or base) buffers, that value is only correct if that buffer > is the current_buffer, or if the buffer's text hasn't been modified (via > an indirect buffer) since it was last current. */ OK, I've committed a fix to trunk. Instead of doing away with the BUF_* macros, I reworked them to handle the indirect buffer case properly. This means they can no longer be used in `BUF_PT (foo) = bar' assignment statements, so I've changed the callers that used them this way. Not sure if the patch is appropriate for the emacs-23 branch, though.