[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC] [PATCH] Change default display of variation selectors
From: |
Robert Pluim |
Subject: |
[RFC] [PATCH] Change default display of variation selectors |
Date: |
Mon, 20 Sep 2021 23:04:10 +0200 |
etc/TODO says:
*** Consider changing the default display of Variation Selectors
Attached a patch to use 'zero-width for them by default (since theyʼre
frigging annoying). We could use 'thin-space by default I suppose. Do
we need to support VS-16 through VS-32 as well?
Robert
--
diff --git i/lisp/international/characters.el w/lisp/international/characters.el
index e08dc27549..5260aa2a24 100644
--- i/lisp/international/characters.el
+++ w/lisp/international/characters.el
@@ -1540,6 +1540,9 @@ update-glyphless-char-display
((eq target 'c1-control)
(glyphless-set-char-table-range glyphless-char-display
#x80 #x9F method))
+ ((eq target 'variation-selectors)
+ (glyphless-set-char-table-range glyphless-char-display
+ #xFE00 #xFE0F method))
((eq target 'format-control)
(when unicode-category-table
(map-char-table
@@ -1575,6 +1578,7 @@ glyphless-set-char-table-range
;;; Control of displaying glyphless characters.
(defcustom glyphless-char-display-control
'((format-control . thin-space)
+ (variation-selectors . zero-width)
(no-font . hex-code))
"List of directives to control display of glyphless characters.
@@ -1590,6 +1594,9 @@ glyphless-char-display-control
such as U+200C (ZWNJ), U+200E (LRM), but
excluding characters that have graphic images,
such as U+00AD (SHY).
+ `variation-selectors': U+FE00..U+FE0F, used for choosing between
+ glyph variations (e.g. Emoji vs Text
+ presentation).
`no-font': characters for which no suitable font is found.
For character terminals, characters that cannot
be encoded by `terminal-coding-system'.
@@ -1607,7 +1614,7 @@ glyphless-char-display-control
only via a custom `:set'
function (`update-glyphless-char-display'), which updates
`glyphless-char-display'."
- :version "24.1"
+ :version "28.1"
:type '(alist :key-type (symbol :tag "Character Group")
:value-type (symbol :tag "Display Method"))
:options '((c0-control
@@ -1628,6 +1635,12 @@ glyphless-char-display-control
(const :tag "Display as empty box" empty-box)
(const :tag "Display acronym" acronym)
(const :tag "Display hex code in a box" hex-code)))
+ (variation-selectors
+ (choice (const :tag "Don't display" zero-width)
+ (const :tag "Display as thin space" thin-space)
+ (const :tag "Display as empty box" empty-box)
+ (const :tag "Display acronym" acronym)
+ (const :tag "Display hex code in a box" hex-code)))
(no-font
(choice (const :tag "Don't display" zero-width)
(const :tag "Display as thin space" thin-space)
- [RFC] [PATCH] Change default display of variation selectors,
Robert Pluim <=