[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-breaking hyphens

From: Eli Zaretskii
Subject: Re: non-breaking hyphens
Date: Mon, 17 Oct 2011 10:45:40 -0400

> From: Chong Yidong <address@hidden>
> 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

          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

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]