emacs-devel
[Top][All Lists]
Advanced

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

Re: Unicode confusables and reordering characters considered harmful, a


From: Yuri Khan
Subject: Re: Unicode confusables and reordering characters considered harmful, a simple solution
Date: Thu, 4 Nov 2021 00:41:07 +0700

On Wed, 3 Nov 2021 at 04:29, Daniel Brooks <db48x@db48x.net> wrote:

> We already have it; it is called whitespace-mode. It’s not perfect, but
> this morning I customized mine to make these characters more obvious:
>
> (custom-set-variables
>  '(whitespace-display-mappings
>    '((space-mark 32 [183] [46])
>      (space-mark 160 [164] [95])
>      (newline-mark 10 [36 10])
>      (tab-mark 9 [187 9] [92 9])
>      (space-mark #x202A [#x21D2]) ; ⇒ LEFT-TO-RIGHT EMBEDDING
>      (space-mark #x202B [#x21D0]) ; ⇐ RIGHT-TO-LEFT EMBEDDING
>      (space-mark #x202D [#x2192]) ; → LEFT-TO-RIGHT OVERRIDE
>      (space-mark #x202E [#x2190]) ; ← RIGHT-TO-LEFT OVERRIDE
>      (space-mark #x2066 [#x21E5]) ; ⇥ LEFT-TO-RIGHT ISOLATE
>      (space-mark #x2067 [#x21E4]) ; ⇤ RIGHT-TO-LEFT ISOLATE
>      (space-mark #x2068 [#x21A7]) ; ↧ FIRST STRONG ISOLATE
>      (space-mark #x202C [#x21D1]) ; ⇑ POP DIRECTIONAL FORMATTING
>      (space-mark #x2069 [#x2912]) ; ⤒ POP DIRECTIONAL ISOLATE
>      )))

I like! I already enable whitespace-mode in prog-mode and text-mode
(and that leaves out read-only modes such as Info and Dired where I
don’t want visible whitespace, and various unclassified modes such as
conf-mode where I do but haven’t gotten around to setting them all
up).



reply via email to

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