emacs-emojify

fork of https://github.com/iqbalansari/emacs-emojify
Log | Files | Refs | LICENSE

commit 77aedecbab1201a648f7c99035cbedcc26ad14a9
parent d279b2027ed4ebc95d53742030e7916926e8b811
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date:   Sun, 26 Apr 2020 13:54:46 +0530

Escape literal '%' in result of format-mode-line

Diffstat:
Memojify.el | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/emojify.el b/emojify.el @@ -1598,11 +1598,13 @@ Re-enable it when buffer changes back to multibyte encoding." The format is converted to the actual string to be displayed using `format-mode-line' and the unicode characters are replaced by images." - (if emojify-mode - ;; Remove "%e" from format since we keep it as first part of the - ;; emojified mode-line, see `emojify-emojify-mode-line' - (emojify-string (format-mode-line (delq "%e" format)) nil 'mode-line) - (format-mode-line format))) + (replace-regexp-in-string "%" + "%%" + (if emojify-mode + ;; Remove "%e" from format since we keep it as first part of the + ;; emojified mode-line, see `emojify-emojify-mode-line' + (emojify-string (format-mode-line (delq "%e" format)) nil 'mode-line) + (format-mode-line format)))) (defun emojify-mode-line-emojified-p () "Check if the mode-line is already emojified.