[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24405: 24.5; Possibly ``forward-word`` doesn't respect ``word-combin
From: |
Eli Zaretskii |
Subject: |
bug#24405: 24.5; Possibly ``forward-word`` doesn't respect ``word-combining-categories`` for word boundaries on changing between latin/phonetic scripts. |
Date: |
Sat, 10 Sep 2016 20:23:25 +0300 |
> From: Oleksandr Gavenko <gavenkoa@gmail.com>
> Cc: 24405@debbugs.gnu.org
> Date: Sat, 10 Sep 2016 20:12:57 +0300
>
> As a workaround should I modify char-script-table?
I'd suggest to write your own word-motion commands. It's not
complicated, you can use regular expressions (which understand
categories, if you need that).
> Another solution is to invent own:
>
> (define-category ?p "Phonetic")
>
> and to add it to IPA characters:
>
> (mapc (lambda (ch) (modify-category-entry ch "p"))
> '(?ʌ ?ə ?ɜ ?ɒ ?ɛ ?θ ?ʊ ?ɪ ?ɔ ?ɑ ?ʃ ?ʧ ?ː ?ˈ ?ˌ ?ʒ ?ŋ))
>
> so it becomes possible to use:
>
> (add-to-list 'word-combining-categories '(?p . ?l))
> (add-to-list 'word-combining-categories '(?l . ?p))
That'd be my second best advice. But I think regular expressions
should provide a better and easier solution.