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 and multibyteness Date: Sat, 31 Jan 2009 12:12:55 -0500 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 1233421993 21333 80.91.229.12 (31 Jan 2009 17:13:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Jan 2009 17:13:13 +0000 (UTC) Cc: emacs-devel@gnu.org, Kenichi Handa To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 31 18:14:26 2009 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 1LTJQE-0004Bb-Tc for ged-emacs-devel@m.gmane.org; Sat, 31 Jan 2009 18:14:23 +0100 Original-Received: from localhost ([127.0.0.1]:58027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTJOw-00042i-AZ for ged-emacs-devel@m.gmane.org; Sat, 31 Jan 2009 12:13:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LTJOs-00042Q-JW for emacs-devel@gnu.org; Sat, 31 Jan 2009 12:12:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LTJOs-00042A-4Z for emacs-devel@gnu.org; Sat, 31 Jan 2009 12:12:58 -0500 Original-Received: from [199.232.76.173] (port=49028 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTJOr-000427-Ve for emacs-devel@gnu.org; Sat, 31 Jan 2009 12:12:58 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:8596) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LTJOq-0006Fw-5V; Sat, 31 Jan 2009 12:12:56 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgMFAGwVhEnO+IQk/2dsb2JhbACBbsV7hBQGgmw X-IronPort-AV: E=Sophos;i="4.37,356,1231131600"; d="scan'208";a="33104284" Original-Received: from 206-248-132-36.dsl.teksavvy.com (HELO pastel.home) ([206.248.132.36]) by ironport2-out.teksavvy.com with ESMTP; 31 Jan 2009 12:12:55 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 757E48229; Sat, 31 Jan 2009 12:12:55 -0500 (EST) In-Reply-To: (Eli Zaretskii's message of "Sat, 31 Jan 2009 16:52:02 +0200") 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:108463 Archived-At: > set-buffer-multibyte jumps through the hoops to DTRT. > By contrast, in buffer-swap-text we do just this: > swapfield (enable_multibyte_characters, Lisp_Object); > Could this cause trouble, e.g. if one of the buffers whose text is > swapped contains eight-bit characters? Why would it? The text is swapped along with the enable_multibyte_characters field, so they should stay consistent. At least that was my reasoning when writing this code. Basically, enable_multibyte_characters should be stored in the buffer_text structure rather than in the buffer itself. Stefan