summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-09-02 11:54:45 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-09-02 11:54:45 +0200
commit4f3cc5276d0c7b53eff34c5b564391134ee414e1 (patch)
tree0f0eab86b5ae4dcd473b1dbbdb6976f8937618b7
parent305b722a61a7a818189a3f8fc9a6494a43289250 (diff)
Allow reloading ucs-names with a prefix arg
* helm-font.el (helm-ucs): Do it.
-rw-r--r--helm-font.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/helm-font.el b/helm-font.el
index 6a8741d0..13b924a1 100644
--- a/helm-font.el
+++ b/helm-font.el
@@ -188,9 +188,15 @@ Only math* symbols are collected."
:buffer "*helm select xfont*"))
;;;###autoload
-(defun helm-ucs ()
- "Preconfigured helm for `ucs-names' math symbols."
- (interactive)
+(defun helm-ucs (arg)
+ "Preconfigured helm for `ucs-names'.
+
+Called with a prefix arg force reloading cache."
+ (interactive "P")
+ (when arg
+ (setq helm-ucs--names nil
+ helm-ucs--max-len nil
+ ucs-names nil))
(let ((char (helm-aif (char-after) (string it))))
(helm :sources 'helm-source-ucs
:keymap helm-ucs-map