[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: non-break-space in tutorial
From: |
Juri Linkov |
Subject: |
Re: non-break-space in tutorial |
Date: |
Tue, 07 Jun 2005 18:33:43 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> 1) Faces are global, but it's extremely desirable to disable special
> treatment of NBSP (etc) on a per-buffer basis. So we can't get rid of
> `show-nonbreak-escape'.
I've already thought about the need to retain `show-nonbreak-escape'.
That is why I used the renamed variable name in my previous mail.
So with the lack of support for buffer-local faces and with changed
treatment of `show-nonbreak-escape' we should rename this variable
to something like `show-no-break-space'.
> 2) The original treatment of NBSP -- displaying it like a normal
> escape character, with backslash prefix and in the normal escape
> character face -- is IMO better than your method, so _at the least_ it
> should be user selectable, but it seems that your patch makes this
> impossible. [And I personally think it should be the default.]
I've seen various texts with a lot of non-breaking spaces.
Additional backslashes render such texts almost unreadable.
Since we can't predict in which context and modes users might
encounter non-breaking spaces, we should make their default
highlighting as least annoying as possible.
> 3) Your patch treats "soft hyphens" in the same way as NBSP, and I'm
> not sure this is desirable; it at least seems worthy of discussion.
It treats soft hyphens as NBSP only in regard of not adding a escape
character. Their faces are different: soft hyphens are displayed in
`escape-glyph', but NBSP in `no-break-space'. I think from the user's
POV this should be fine. I'm still not sure about the need for a
separate user option (e.g. `show-soft-hyphen') for configuring the
display of soft hypens.
> BTW, something funny I noticed while testing, though I'm not sure
> whether it is caused by your patch or not, is that when displaying on
> a tty with `terminal-coding-system' set to nil, both NBSP and
> soft-hyphen are show as "?". Since most fonts simply display these
> character in the same way as their non-special brothers, wouldn't be
> good for emacs to do the translation itself so that they show up ok on
> simple ascii terminals?
It is caused by the 2005-03-24 change in xdisp.c:
{
XSETINT (it->ctl_chars[0], escape_glyph);
- g = it->c == 0x8ad ? '-' : ' ';
+ g = it->c;
XSETINT (it->ctl_chars[1], g);
ctl_len = 2;
goto display_control;
which now doesn't replace the NBSP by an SPC. Maybe this line should
be restored for ascii terminals?
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: non-break-space in tutorial, Juri Linkov, 2005/06/06
- Re: non-break-space in tutorial, Stefan Monnier, 2005/06/06
- Re: non-break-space in tutorial, Miles Bader, 2005/06/06
- Re: non-break-space in tutorial,
Juri Linkov <=
- Re: non-break-space in tutorial, Miles Bader, 2005/06/07
- Re: non-break-space in tutorial, Gaëtan LEURENT, 2005/06/07
- Re: non-break-space in tutorial, Miles Bader, 2005/06/07
- Re: non-break-space in tutorial, Luc Teirlinck, 2005/06/07
- Re: non-break-space in tutorial, Miles Bader, 2005/06/07
- Re: non-break-space in tutorial, Gaëtan LEURENT, 2005/06/08
- Re: non-break-space in tutorial, Juri Linkov, 2005/06/08