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


From: Gregory Heytings
Subject: Re: Unicode confusables and reordering characters considered harmful
Date: Wed, 03 Nov 2021 20:12:21 +0000


+   '(("\N{LEFT-TO-RIGHT EMBEDDING}\\|\N{RIGHT-TO-LEFT EMBEDDING}\\|\
+\N{LEFT-TO-RIGHT OVERRIDE}\\|\N{RIGHT-TO-LEFT OVERRIDE}\\|\
+\N{LEFT-TO-RIGHT ISOLATE}\\|\N{RIGHT-TO-LEFT ISOLATE}\\|\
+\N{FIRST STRONG ISOLATE}\\|\N{POP DIRECTIONAL FORMATTING}\\|\
+\N{POP DIRECTIONAL ISOLATE}" . (0 'font-lock-warning-face t)))))

A [...] would be a lot more efficient than this "...\\|...\\|...\\|...".

+(defun bidi-reordering-character-toggle-visibility ()
+  "Toggle the visibility of bidi reordering characters."
+  (interactive)
+  (setq bidi-reordering-characters-visible
+        (not bidi-reordering-characters-visible))

Aka

   (define-minor-mode bidi-reordering-characters-visible
     "Make the bidi reordering characters visible."
     :global t
     ...)
   (define-obsolete-function-alias
     'bidi-reordering-character-toggle-visibility
     #'bidi-reordering-characters-visible "...")


Thanks for your comments! Indeed and indeed. I did not spend enough time tweaking that code, given that Eli already said he doesn't want it.



reply via email to

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