[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/popup e742014 180/184: Merge pull request #124 from auto-c
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/popup e742014 180/184: Merge pull request #124 from auto-complete/dis |
Date: |
Wed, 6 Oct 2021 00:01:38 -0400 (EDT) |
branch: elpa/popup
commit e7420146a7bc6365e4a56af28508aa9687a9906e
Merge: 866a091 416049d
Author: Jen-Chieh Shen <jcs090218@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #124 from auto-complete/dis
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 4438b94 136/184: Merge pull request #95 from Konubinix/master, (continued)
- [nongnu] elpa/popup 4438b94 136/184: Merge pull request #95 from Konubinix/master, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 4dbed57 137/184: Update cl-lib version, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 0a6447b 157/184: correct spelling mistake, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 98965e8 156/184: Fix typo in the docstring of popup-x-string, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup a7ed816 174/184: Upate license year., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 13364d7 173/184: Add more Emacs version for CI test., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 866a091 178/184: Add homepage url, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 4abbbf9 146/184: Merge pull request #99 from spwhitton/apt-get, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup e452399 153/184: Add popup-isearch-yank., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup b436b63 168/184: Merge pull request #111 from drvink/patch-1, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup e742014 180/184: Merge pull request #124 from auto-complete/dis,
ELPA Syncer <=
- [nongnu] elpa/popup 9d104d4 172/184: Bump version., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup af0c179 018/184: Add ERT as git submodule, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup d097dba 029/184: Remove unused code., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup caca8dd 050/184: Merge pull request #22 from froydnj/update-readme, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 748c109 068/184: Merge pull request #31 from tkf/inherit-face, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 1277ab1 073/184: Merge pull request #23 from uk-ar/uk-ar-add-test-case, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup d7c98db 084/184: Fix for byte compile warnings, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 53bb3ec 117/184: bump up version, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup b9fc32c 092/184: Merge pull request #60 from auto-complete/delete-trailing-spaces, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 7817f1e 089/184: Add 'nostrip' parameter to 'popup-tip'(#42), ELPA Syncer, 2021/10/06