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: buffer-swap-text Date: Fri, 24 Oct 2008 00:05:08 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224821131 11519 80.91.229.12 (24 Oct 2008 04:05:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2008 04:05:31 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 24 06:06:32 2008 connect(): Connection refused 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.50) id 1KtDwU-0000qm-Nk for ged-emacs-devel@m.gmane.org; Fri, 24 Oct 2008 06:06:30 +0200 Original-Received: from localhost ([127.0.0.1]:54241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtDvO-0004G0-Li for ged-emacs-devel@m.gmane.org; Fri, 24 Oct 2008 00:05:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtDvJ-0004ES-UP for emacs-devel@gnu.org; Fri, 24 Oct 2008 00:05:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtDvI-0004DZ-CZ for emacs-devel@gnu.org; Fri, 24 Oct 2008 00:05:17 -0400 Original-Received: from [199.232.76.173] (port=50425 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtDvI-0004DS-2j for emacs-devel@gnu.org; Fri, 24 Oct 2008 00:05:16 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:26625 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KtDvF-0007ff-PT; Fri, 24 Oct 2008 00:05:13 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjMFAMLmAElFxLrB/2dsb2JhbACBdb99g06BCw X-IronPort-AV: E=Sophos;i="4.33,474,1220241600"; d="scan'208";a="28803244" Original-Received: from 69-196-186-193.dsl.teksavvy.com (HELO ceviche.home) ([69.196.186.193]) by ironport2-out.teksavvy.com with ESMTP; 24 Oct 2008 00:05:10 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0B55FB4099; Fri, 24 Oct 2008 00:05:09 -0400 (EDT) In-Reply-To: (Richard M. Stallman's message of "Thu, 23 Oct 2008 17:09:14 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:104929 Archived-At: > I don't see any benefit to hardcode this in buffer-swap-text. > We may very well rename buffer-swap-text to buffer-swap-text-internal > and introduce a new buffer-swap-text which can perform such things > (probably using write-region-annotation-function), as well as swap > variables like buffer-file-coding-system. > That would be ok, I suppose, but one advantage of doing it in C > is that there is no chance anything can cause it to swap > the text without swapping the rest. It is not necessary to swap the rest at the same time. More specifically, it will not cause any inconsistency or crash. Now, maybe in all practical cases swapping those other things will be necessary to provide the desired behavior, but there may just as well be uses of buffer-swap-text where swapping those other variables is not needed or undesirable. Stefan