unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Latin-1 non breaking space not highlighted
@ 2002-04-14 23:30 Ulrich Neumerkel
  2002-04-16 20:16 ` Richard Stallman
  0 siblings, 1 reply; 21+ messages in thread
From: Ulrich Neumerkel @ 2002-04-14 23:30 UTC (permalink / raw)
  Cc: emacs-devel, ulrich

> From: "Eli Zaretskii" <eliz@is.elta.co.il>
> I see two possible solutions:
>
>   - hardcode a few more special characters, like ISO8859-x NBSP and a
>     few Unicode characters;
> or
>   - use syntax tables for non-ASCII characters only, assuming that no
>     Lisp package does anything weird with their syntax class.

Both solutions may cause problems with other/new encoding systems.
Maybe better:
   - use the syntax table of the corresponding fundamental mode

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Latin-1 non breaking space not highlighted
@ 2002-04-14 23:54 Kenichi Handa
  0 siblings, 0 replies; 21+ messages in thread
From: Kenichi Handa @ 2002-04-14 23:54 UTC (permalink / raw)
  Cc: rms, ulrich, emacs-devel

"Eli Zaretskii" <eliz@is.elta.co.il> writes:
>>  It looks like there is a real problem.  I guess we should not simply
>>  change show-trailing-whitespace to use the whitespace syntax class.

> I see two possible solutions:

>   - hardcode a few more special characters, like ISO8859-x NBSP and a
>     few Unicode characters;
> or
>   - use syntax tables for non-ASCII characters only, assuming that no
>     Lisp package does anything weird with their syntax class.

I think show-trailing-whitespace should not be affected by
syntax of characters because what it should concern is a
glyph.  If a glyph of a character is just space, even if the
syntax is `symbol' or whatever else, it should be
highlighted.

So, what we need is a char-table of such characters that are
displayed by white glyph.  In addition to many NBSPs, that
char-table should also contain the following CJK white-space
characters:
 (make-char 'japanese-jisx0208-1978 33 33)
 (make-char 'chinese-gb2312 33 33)
 (make-char 'japanese-jisx0208 33 33)
 (make-char 'korean-ksc5601 33 33)
 (make-char 'chinese-cns11643-1 33 33)
 (make-char 'japanese-jisx0213-1 33 33)
 (make-char 'chinese-big5-1 33 33)

---
Ken'ichi HANDA
handa@etl.go.jp

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Latin-1 non breaking space not highlighted
@ 2002-04-19  1:55 Kenichi Handa
  2002-04-19 13:55 ` Stefan Monnier
  0 siblings, 1 reply; 21+ messages in thread
From: Kenichi Handa @ 2002-04-19  1:55 UTC (permalink / raw)
  Cc: eliz, monnier+gnu/emacs, rms, ulrich, emacs-devel

"Stefan Monnier" <monnier+gnu/emacs@RUM.cs.yale.edu> writes:
>>  But Handa-san listed a couple of problems with using the standard syntax 
>>  tables.

> I seem to have missed his email.

My point is:
show-trailing-whitespace should not mean highlighting such
charactes that have "whitespace" SYNTAX, but should mean
highlighting sucn characters that have "whitespace" GLYPH.

Both sets of characters mostly overlap but not necessarily
be the same.

For instance, even if I set syntax of NBSP to "word
constitute", show-trailing-whitespace should highlight it.

---
Ken'ichi HANDA
handa@etl.go.jp

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Latin-1 non breaking space not highlighted
@ 2002-04-22  1:53 Kenichi Handa
  2002-04-22 22:37 ` Richard Stallman
  0 siblings, 1 reply; 21+ messages in thread
From: Kenichi Handa @ 2002-04-22  1:53 UTC (permalink / raw)
  Cc: monnier+gnu/emacs, eliz, rms, ulrich, emacs-devel

"Stefan Monnier" <monnier+gnu/emacs@RUM.cs.yale.edu> writes:
>>  My point is:
>>  show-trailing-whitespace should not mean highlighting such
>>  charactes that have "whitespace" SYNTAX, but should mean
>>  highlighting sucn characters that have "whitespace" GLYPH.

> That's a separate issue.  Related to whether or not we should
> take the display-table into account.

In my understanding, the purpose of show-trailing-whitespace
is to tell users that there are characters that has space
glyphs (thus invisible) at end of line.  So, yes, if some
characters are displayed by SPCs because of display-table,
it is better that we take that info account (although it may
require a rather big change in the display engine).  Anyway,
we should not decide if a character should be highlighted or
not simply by its syntax.

>>  Both sets of characters mostly overlap but not necessarily
>>  be the same.
>>  
>>  For instance, even if I set syntax of NBSP to "word
>>  constitute",

> When would you do that and why (considering that we're specifically
> talking about the global standard-syntax-table) ?

The above is just an example.  I don't mean it's useful.
But, hmmm, perhaps, it may be useful for filling.

>>  show-trailing-whitespace should highlight it.

> Really ?  I think this very much depends on the answer to the
> previous question.

I really think NBSP should be highlighted also in such a
(hypothetical) situation.  What do the other people think?

> We really just need a table somewhere that tells us what is whitespace
> and what isn't.  Currently I think there are two such tables, one is
> the standard-syntax-table, the other is the ` ' category.  Actually,
> I [:space:] and [:blank:] are two more, but [:space:] relies on the
> buffer-local syntax-table (i.e. not good, although it's not that bad
> since it only uses it for non-ASCII chars, IIRC) and [:blank:] only
> matches ASCII chars (i.e. not good either).

I have forgotten about ` ' category.  Do you know which
character has this category and how is that category used?

---
Ken'ichi HANDA
handa@etl.go.jp

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2002-04-22 22:37 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.SUN.3.91.1020408100627.28830A-100000@is>
2002-04-09 12:08 ` Latin-1 non breaking space not highlighted Richard Stallman
2002-04-09 14:37   ` Eli Zaretskii
2002-04-10 20:16     ` Richard Stallman
2002-04-11 18:54       ` Eli Zaretskii
2002-04-12  8:18         ` Eli Zaretskii
2002-04-13 19:06           ` Richard Stallman
2002-04-14  4:10             ` Eli Zaretskii
2002-04-15 21:59               ` Richard Stallman
2002-04-18  5:38                 ` Eli Zaretskii
2002-04-18 10:18                   ` Stefan Monnier
2002-04-18 11:33                     ` Eli Zaretskii
2002-04-18 10:36                       ` Stefan Monnier
2002-04-19  5:25                     ` Richard Stallman
2002-04-14 23:30 Ulrich Neumerkel
2002-04-16 20:16 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2002-04-14 23:54 Kenichi Handa
2002-04-19  1:55 Kenichi Handa
2002-04-19 13:55 ` Stefan Monnier
2002-04-19 14:07   ` Miles Bader
2002-04-22  1:53 Kenichi Handa
2002-04-22 22:37 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).