From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: non-breaking hyphens Date: Wed, 19 Oct 2011 11:27:15 +0300 Organization: JURTA Message-ID: <8762jlmofg.fsf@mail.jurta.org> References: <87d3dvg1r5.fsf@gnu.org> <87ehybm0i0.fsf@gnu.org> <83r52buey8.fsf@gnu.org> <87pqhuwli7.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319012955 26898 80.91.229.12 (19 Oct 2011 08:29:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 Oct 2011 08:29:15 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 19 10:29:11 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RGRWQ-0003kG-Hm for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2011 10:29:10 +0200 Original-Received: from localhost ([::1]:37522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGRWP-0006CM-Sq for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2011 04:29:09 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGRWJ-00064v-6K for emacs-devel@gnu.org; Wed, 19 Oct 2011 04:29:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGRWE-0003zh-4Q for emacs-devel@gnu.org; Wed, 19 Oct 2011 04:29:01 -0400 Original-Received: from smarty.dreamhost.com ([208.113.175.8]:50661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGRW6-0003va-6b; Wed, 19 Oct 2011 04:28:50 -0400 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 0C3D66E8069; Wed, 19 Oct 2011 01:28:47 -0700 (PDT) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id EB010451C4B2; Wed, 19 Oct 2011 01:28:45 -0700 (PDT) In-Reply-To: <87pqhuwli7.fsf@gnu.org> (Chong Yidong's message of "Tue, 18 Oct 2011 08:08:00 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.113.175.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145317 Archived-At: > The right way to implement this feature, as brought up in the 2004 > thread, would be to specify the affected characters with a char-table > rather than hardcoding them. But we should probably leave such a change > till after 24.1. Since glyphless characters (like "ZERO WIDTH NO-BREAK SPACE") are displayed now using a char-table, it makes sense to display confusable characters with a similar char-table (e.g. `confusable-char-display') where display methods could specify how to display them (face, etc.) BTW, there is already a mapping in lisp/international/latin1-disp.el in `latin1-display-ucs-per-lynx' that can be used to match confusable characters. > In the meantime, I think I'll add non-breaking hyphen and hyphen to the > hardcoded list, while deferring on the various other space characters; While they are still hadrcoded, requires another change: === modified file 'lisp/descr-text.el' --- lisp/descr-text.el 2011-09-29 00:12:44 +0000 +++ lisp/descr-text.el 2011-10-19 08:22:27 +0000 @@ -606,7 +606,8 @@ (defun describe-char (pos &optional buff 'trailing-whitespace) ((and nobreak-char-display char (eq char '#xa0)) 'nobreak-space) - ((and nobreak-char-display char (eq char '#xad)) + ((and nobreak-char-display char + (memq char '(#xad #x2010 #x2011))) 'escape-glyph) ((and (< char 32) (not (memq char '(9 10)))) 'escape-glyph)))))