From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Usage of standard-display-table in MSDOS Date: Sat, 28 Aug 2010 13:18:02 +0900 Message-ID: References: <83aao8mjzx.fsf@gnu.org> <837hjcm9cw.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282969115 27886 80.91.229.12 (28 Aug 2010 04:18:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Aug 2010 04:18:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 28 06:18:32 2010 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 1OpCs8-0004kX-6u for ged-emacs-devel@m.gmane.org; Sat, 28 Aug 2010 06:18:28 +0200 Original-Received: from localhost ([127.0.0.1]:60771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OpCs7-00062U-8C for ged-emacs-devel@m.gmane.org; Sat, 28 Aug 2010 00:18:27 -0400 Original-Received: from [140.186.70.92] (port=42941 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OpCry-00060Q-0d for emacs-devel@gnu.org; Sat, 28 Aug 2010 00:18:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OpCrs-0003JE-R5 for emacs-devel@gnu.org; Sat, 28 Aug 2010 00:18:17 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:52607) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OpCrn-0003IP-29; Sat, 28 Aug 2010 00:18:07 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id o7S4I39q013568; Sat, 28 Aug 2010 13:18:03 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id o7S4I3GN010792; Sat, 28 Aug 2010 13:18:03 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id o7S4I26m000070; Sat, 28 Aug 2010 13:18:02 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.71) (envelope-from ) id 1OpCri-0002qP-Pw; Sat, 28 Aug 2010 13:18:02 +0900 In-Reply-To: <837hjcm9cw.fsf@gnu.org> (message from Eli Zaretskii on Fri, 27 Aug 2010 17:13:51 +0300) X-detected-operating-system: by eggs.gnu.org: Solaris 9 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:129328 Archived-At: In article <837hjcm9cw.fsf@gnu.org>, Eli Zaretskii writes: > > > "Display characters in the range L to H literally." > > > > > The "literally" part is no longer true, is it? > > > > What's the meaning of "literally" when a display table > > element is [#xA0]? > It means that a literal byte 0xA0 is sent to the terminal. >From which document, can we get that interpretation? The docstring of buffer-display-table says: Each element should be a vector of characters or nil. The value nil means display the character in the default fashion; otherwise, the characters from the vector are delivered to the screen instead of the original character. It only says about "character". Although it doesn't say how to deliver a character to a terminal, the natural way is to encode that character by the terminal coding system, or display that character by the corresponding glyph of a font. > > Before Emacs 23, the character #xA0 represents the byte > > 0xA0. But now it is a character representing a Unicode > > character U+00A0, and #x3FFFA0 is the character representing > > the byte 0xA0. > > > > And, to "display characters literally", we have been encoded > > characters by the terminal coding system. Before Emacs 23, > > the encoded result of #xA0 is always the byte 0xA0, but now > > it depends on the terminal coding system. > Which means, AFAIU, that "literally" is no longer possible. At least > in the case of a multibyte buffer. > What about a unibyte buffer, though? How do we display the characters > there? This is the way to display the character #xA0 (in multibyte-buffer) and the chararacter representing the byte #xA0 (in both multibyte-buffer and unibyte-buffer) by sending the byte #xA0 to the terminal . ;; For NBSP (U+00A0) (aset standard-display-table #xA0 (vector (unibyte-char-to-multibyte #xA0))) ;; For byte #xA0. (aset standard-display-table (unibyte-char-to-multibyte #xA0) (vector (unibyte-char-to-multibyte #xA0))) (set-terminal-coding-sytem 'no-conversion) (set-safe-terminal-coding-system-internal 'no-conversion) The last two lines are currently necessary because of a bug in term.c. I'm going to fix it. --- Kenichi Handa handa@m17n.org