summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-09-02 07:52:07 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-09-02 07:52:07 +0200
commite0f1421d3a433f1736199546775aff5fed61ab4b (patch)
tree9e61870438ae9ba2a46d3339bfc8b26973fac6a6
parent69f43f0e3a3ff5889e0c326305630e3c67ce8a64 (diff)
Filter out characters without font (squares) in ucs
* helm-font.el (helm-ucs-init): Do it.
-rw-r--r--helm-font.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/helm-font.el b/helm-font.el
index 029b390a..3167b0b5 100644
--- a/helm-font.el
+++ b/helm-font.el
@@ -91,12 +91,15 @@ Only math* symbols are collected."
(or helm-ucs--names
(setq helm-ucs--names
(cl-loop for (n . v) in (ucs-names)
- for len = (length (format "#x%x:" v))
+ for xcode = (format "#x%x:" v)
+ for len = (length xcode)
for diff = (- (car helm-ucs--max-len) len)
for code = (format "(#x%x): " v)
for char = (propertize (format "%c" v)
'face 'helm-ucs-char)
- unless (string= "" n) collect
+ unless (or (string= "" n)
+ (not (char-displayable-p (read xcode))))
+ collect
(concat code (make-string diff ? )
char " " n)))))