[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0f6bf30: characters.el: remove repetition in glyphless-char-displ
From: |
Robert Pluim |
Subject: |
master 0f6bf30: characters.el: remove repetition in glyphless-char-display-control |
Date: |
Wed, 1 Dec 2021 11:30:43 -0500 (EST) |
branch: master
commit 0f6bf308ab302cb8850e97bd7e41a4b432fcfeca
Author: Robert Pluim <rpluim@gmail.com>
Commit: Robert Pluim <rpluim@gmail.com>
characters.el: remove repetition in glyphless-char-display-control
* lisp/international/characters.el (glyphless-char-display-method):
New custom widget for the different options for displaying glyphless
characters.
(glyphless-char-display-control): Use 'glyphless-char-display-method'.
---
lisp/international/characters.el | 53 ++++++++++++++--------------------------
1 file changed, 18 insertions(+), 35 deletions(-)
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 9e0cc88..3b8924f 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -1576,6 +1576,19 @@ option `glyphless-char-display'."
(set-char-table-range chartable (cons from to) method)))
;;; Control of displaying glyphless characters.
+(define-widget 'glyphless-char-display-method 'lazy
+ "Display method for glyphless characters."
+ :group 'mule
+ :format "%v"
+ :value 'thin-space
+ :type
+ '(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)))
+
(defcustom glyphless-char-display-control
'((format-control . thin-space)
(variation-selectors . thin-space)
@@ -1619,41 +1632,11 @@ function (`update-glyphless-char-display'), which
updates
:version "28.1"
:type '(alist :key-type (symbol :tag "Character Group")
:value-type (symbol :tag "Display Method"))
- :options '((c0-control
- (choice :value thin-space
- (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)))
- (c1-control
- (choice :value thin-space
- (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)))
- (format-control
- (choice :value thin-space
- (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)))
- (variation-selectors
- (choice :value thin-space
- (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 :value hex-code
- (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))))
+ :options '((c0-control glyphless-char-display-method)
+ (c1-control glyphless-char-display-method)
+ (format-control glyphless-char-display-method)
+ (variation-selectors glyphless-char-display-method)
+ (no-font (glyphless-char-display-method :value hex-code)))
:set 'update-glyphless-char-display
:group 'display)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0f6bf30: characters.el: remove repetition in glyphless-char-display-control,
Robert Pluim <=