[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/popup 416049d 179/184: Fix non displayable character
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/popup 416049d 179/184: Fix non displayable character |
Date: |
Wed, 6 Oct 2021 00:01:38 -0400 (EDT) |
branch: elpa/popup
commit 416049d6cb88a715948f0c9770de6ffec963c876
Author: JenChieh <jcs090218@gmail.com>
Commit: JenChieh <jcs090218@gmail.com>
Fix non displayable character
---
popup.el | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/popup.el b/popup.el
index ed7efac..4fee3ac 100644
--- a/popup.el
+++ b/popup.el
@@ -33,6 +33,7 @@
;;; Code:
(require 'cl-lib)
+(require 'mule)
(defconst popup-version "0.5.8")
@@ -238,6 +239,19 @@ ITEM is not string."
(if (stringp item)
(get-text-property 0 property item)))
+(defun popup-replace-displayable (str &optional rep)
+ "Replace non-displayable character from STR.
+
+Optional argument REP is the replacement string of non-displayable character."
+ (unless rep (setq rep ""))
+ (let ((result ""))
+ (mapcar (lambda (ch)
+ (setq result (concat result
+ (if (char-displayable-p ch) (string ch)
+ rep))))
+ str)
+ result))
+
(cl-defun popup-make-item (name
&key
value
@@ -1057,6 +1071,8 @@ PROMPT is a prompt string when reading events during
event loop."
;; TODO strip text (mainly face) properties
(setq string (substring-no-properties string)))
+ (setq string (popup-replace-displayable string))
+
(and (eq margin t) (setq margin 1))
(or margin-left (setq margin-left margin))
(or margin-right (setq margin-right margin))
- [nongnu] elpa/popup 5e9043e 032/184: Bug fix for test helper, (continued)
- [nongnu] elpa/popup 5e9043e 032/184: Bug fix for test helper, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup a651fa0 090/184: Merge pull request #59 from auto-complete/add-unstrip-parameter, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup de70ea8 088/184: Merge pull request #56 from ryantm/cl-lib, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 140f12d 122/184: Update Installation section, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 80829dd 154/184: Fix for newer Cask directory hierarchy, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup df4b147 159/184: Removed looking for new maintainer., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 0eeb16d 160/184: Merge pull request #113 from EdwardBetts/spelling, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 2d3226a 169/184: Comment indentation., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup fa96fe6 155/184: Count only visible lines for popup direction, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 24619f5 183/184: Merge pull request #126 from phst/mapcar, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 416049d 179/184: Fix non displayable character,
ELPA Syncer <=
- [nongnu] elpa/popup e2eb047 126/184: svg is better than png, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup dbf62bf 131/184: readme updated, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 004d58c 144/184: Merge pull request #97 from markus1189/eldoc, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 72c4028 151/184: extend overriding of background face for isearch, selection, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 4839797 158/184: Looking for new maintainer, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 46e6104 162/184: Fixed some checkdoc warnings., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup ba90de4 004/184: Added documentation., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup a6f582c 114/184: Merge pull request #76 from ramnes/master, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 55f3183 165/184: Bump version., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 0778cad 163/184: Bump version., ELPA Syncer, 2021/10/06