unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: emacs-devel@gnu.org
Subject: [RFC] [PATCH] Change default display of variation selectors
Date: Mon, 20 Sep 2021 23:04:10 +0200	[thread overview]
Message-ID: <87a6k7hsc5.fsf@gmail.com> (raw)


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)



             reply	other threads:[~2021-09-20 21:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 21:04 Robert Pluim [this message]
2021-09-21  8:28 ` [RFC] [PATCH] Change default display of variation selectors Eli Zaretskii
2021-09-21  9:50   ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6k7hsc5.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).