From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: non-breaking hyphens Date: Mon, 17 Oct 2011 10:45:40 -0400 Message-ID: References: <87d3dvg1r5.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1318862756 24101 80.91.229.12 (17 Oct 2011 14:45:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2011 14:45:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 17 16:45:50 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 1RFoRp-0005xg-DJ for ged-emacs-devel@m.gmane.org; Mon, 17 Oct 2011 16:45:50 +0200 Original-Received: from localhost ([::1]:49488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFoRo-0004AJ-NN for ged-emacs-devel@m.gmane.org; Mon, 17 Oct 2011 10:45:48 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFoRi-00049J-H6 for emacs-devel@gnu.org; Mon, 17 Oct 2011 10:45:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFoRh-00042j-CH for emacs-devel@gnu.org; Mon, 17 Oct 2011 10:45:42 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:53851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFoRh-00042c-2q for emacs-devel@gnu.org; Mon, 17 Oct 2011 10:45:41 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RFoRg-0000YS-Vf; Mon, 17 Oct 2011 10:45:40 -0400 In-reply-to: <87d3dvg1r5.fsf@gnu.org> (message from Chong Yidong on Mon, 17 Oct 2011 09:56:46 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 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:145260 Archived-At: > From: Chong Yidong > Date: Mon, 17 Oct 2011 09:56:46 -0400 > > >From the Text Display node in the Emacs manual: > > Some character sets define "no-break" versions of the space and > hyphen characters, which are used where a line should not be broken. > Emacs normally displays these characters with special faces > (respectively, `nobreak-space' and `escape-glyph') to distinguish them > from ordinary spaces and hyphens. > > Hmm---inserting #x2011 (NON-BREAKING HYPHEN) into the buffer does not > show the character in the `escape-glyph' face. Does anyone know if > #x2011 is indeed the character that manual is referring to? Is the > manual description obsolete or is the Emacs behavior buggy? The manual is referring to #xAD, see this fragment from get_next_display_element (and the code thereafter which references nbsp_or_shy): if (! ASCII_CHAR_P (c) && ! NILP (Vnobreak_char_display)) nbsp_or_shy = (c == 0xA0 ? char_is_nbsp : c == 0xAD ? char_is_soft_hyphen : char_is_other); Based on this, I'd say that the implementation is incomplete: it only supports a subset of no-break characters defined by the Unicode standard. Note that the no-break characters should be displayed with the `nobreak-space' face, not `escape-glyph' face. I think that the manual should also mention the nobreak-char-display variable.