Skip to content

Commit

Permalink
Merge pull request #135 from gcv/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Sep 27, 2022
2 parents a9635a2 + bc50a53 commit 20ce6cb
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions popup.el
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,17 @@ ITEM is not string."
(defun popup-replace-displayable (str &optional rep)
"Replace non-displayable character from STR.
Optional argument REP is the replacement string of non-displayable character."
(let ((result "") (rep (or rep "")))
(mapc (lambda (ch)
(setq result (concat result
(if (char-displayable-p ch) (string ch)
rep))))
str)
result))
Optional argument REP is the replacement string of
non-displayable character."
(let ((rep (or rep ""))
(results (list)))
(dolist (string (split-string str ""))
(let* ((char (string-to-char string))
(string (if (char-displayable-p char)
string
rep)))
(push string results)))
(string-join (reverse results))))

(cl-defun popup-make-item (name
&key
Expand Down

0 comments on commit 20ce6cb

Please sign in to comment.