bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: set-case-syntax-pair and oc-unicode


From: Sergei Pokrovsky
Subject: Re: set-case-syntax-pair and oc-unicode
Date: 04 Oct 2001 12:26:16 +0700
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.6

>>>>> "SM" == "Stefan Monnier  writes:

  SM> [ This should probably be moved to gnu.emacs.bug. ]

Okay, I crosspost to (currently empty) gnu.emacs.bug, and if it works,
I'll move there (or you could tell me an email address).

  SM> Could you make sure that the problem doesn't show up in
  SM> fundamental-mode

  >> It is there in the Fundamental mode too.

  SM> That's *really* odd. Can you show me the result of
  SM> (elt (syntax-table) ?<char>) and
  SM> (elt (standard-syntax-table) ?<char>)
  SM> from within a fundamental-mode buffer ?

Well, if I set (fundamental-mode) in the *scratch* then both yield (2)
if I press C-x C-e -- and that's different for the first sexp in the
text-mode; BUT that doesn't make the characters into word
constituents!  M-f, M-b stumble in both text and fundamental mode,
even though (elt (syntax-table) ?<char>) are different.

  >> Here is a very similar ASCII test:

  SM> Actually, it's not so similar ;-(

[...]

  SM> The reason why the syntax of ?~ and ?_ in text-mode has not been
  SM> changed is that those characters do not inherit from the
  SM> standard-syntax-table (for a reason that escapes me). Since that
  SM> syntax-table is created before you do (set-case-syntax-pair ?~
  SM> ?_ tbl), it is unaffected. I.e. it's not the behavior you want
  SM> and is arguably a bug, but it is at least "as documented" as far
  SM> as the documentation of `make-syntax-table' goes.
  SM> On the other hand, make-syntax-table says that letters should
  SM> inherit and should hence not exhibit the above problem. And
  SM> looking at the elisp code for make-syntax-table, I see that it
  SM> does correctly set up inheritance for all the non-ASCII chars
  SM> (assumed to be letters), so the problem you see with ~ is not
  SM> the same that you see with the utf-8 chars.

Well, it seems that there are more than one problem:

1) One with the ASCII _~
2) Other(s) with the utf-8 chars which persists even when 
   (elt (syntax-table) ?X) => (2)

[...]

  SM> Yes, because in that case, you'll end up in a buffer that's in
  SM> fundamental-mode where the local syntax-table is the same as
  SM> standard-syntax-table and there is thus no problem of
  SM> inheritance not working.

Yes, that's true for the ASCII case.

  SM> This must be getting tiresome for you, but if you could try
  SM> another self-contained example a bit closer to what you're
  SM> doing...

Okay, I shall try.

-- 
Sergei



reply via email to

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