From e5ef0438c96b87cfcefb5b5a436eea7e5e1bcc4c Mon Sep 17 00:00:00 2001 From: JenChieh Date: Fri, 31 Mar 2023 20:50:04 -0700 Subject: [PATCH] fix(help): Apply displayable char in help menu --- lisp/_prepare.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/_prepare.el b/lisp/_prepare.el index ca1f019d..eabaaa03 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -1209,7 +1209,7 @@ character." "Make sure all keywords is displayable in STRING." (let* ((string (eask--msg-char-displayable "✓" "v" string)) (string (eask--msg-char-displayable "✗" "X" string)) - (string (eask--msg-char-displayable "💡" "?!" string))) + (string (eask--msg-char-displayable "💡" "" string))) string)) (defun eask--format-paint-kwds (msg &rest args) @@ -1386,12 +1386,12 @@ character." (while (not (eobp)) (forward-line 1) (goto-char (line-beginning-position)) - (insert " ") + (insert " ") (goto-char (line-end-position)) (setq max-column (max (current-column) max-column))) (eask-msg (concat "''" (spaces-string max-column) "''")) (eask-msg (ansi-white (buffer-string))) - (eask-msg (concat "''" (spaces-string max-column) "'" "'")))) + (eask-msg (concat "''" (spaces-string max-column) "''")))) (defun eask-help (command) "Show COMMAND's help instruction." @@ -1400,7 +1400,10 @@ character." (if (file-exists-p help-file) (with-temp-buffer (insert-file-contents help-file) - (unless (string= (buffer-string) "") + (unless (string-empty-p (buffer-string)) + (let ((buf-str (eask--msg-displayable-kwds (buffer-string)))) + (erase-buffer) + (insert buf-str)) (eask--help-display))) (eask-error "Help manual missig %s" help-file))))