[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ed378c9: Use Unicode arrows in shortdoc results
From: |
Lars Ingebrigtsen |
Subject: |
master ed378c9: Use Unicode arrows in shortdoc results |
Date: |
Sun, 11 Oct 2020 05:21:58 -0400 (EDT) |
branch: master
commit ed378c95b63036ec819564b0d6203a3b7cb52f33
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Use Unicode arrows in shortdoc results
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Use
Unicode arrows if possible.
---
lisp/emacs-lisp/shortdoc.el | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index f4eeb99..cabf026 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -983,7 +983,13 @@ There can be any number of :example/:result elements."
(insert "\n")
(add-face-text-property start-section (point) 'shortdoc-section t)
(let ((start (point))
- (print-escape-newlines t))
+ (print-escape-newlines t)
+ (double-arrow (if (char-displayable-p ?⇒)
+ "⇒"
+ "=>"))
+ (single-arrow (if (char-displayable-p ?→)
+ "→"
+ "->")))
(cl-loop for (type value) on data by #'cddr
do
(cl-case type
@@ -993,7 +999,7 @@ There can be any number of :example/:result elements."
(insert " ")
(prin1 value (current-buffer))
(insert "\n")
- (insert " => ")
+ (insert " " double-arrow " ")
(prin1 (eval value) (current-buffer))
(insert "\n")))
(:no-eval*
@@ -1001,7 +1007,7 @@ There can be any number of :example/:result elements."
(insert " " value "\n")
(insert " ")
(prin1 value (current-buffer)))
- (insert "\n -> "
+ (insert "\n " single-arrow " "
(propertize "[it depends]"
'face 'variable-pitch)
"\n"))
@@ -1018,19 +1024,19 @@ There can be any number of :example/:result elements."
(prin1 value (current-buffer)))
(insert "\n"))
(:result
- (insert " => ")
+ (insert " " double-arrow " ")
(prin1 value (current-buffer))
(insert "\n"))
(:result-string
- (insert " => ")
+ (insert " " double-arrow " ")
(princ value (current-buffer))
(insert "\n"))
(:eg-result
- (insert " eg. => ")
+ (insert " eg. " double-arrow " ")
(prin1 value (current-buffer))
(insert "\n"))
(:eg-result-string
- (insert " eg. => ")
+ (insert " eg. " double-arrow " ")
(princ value (current-buffer))
(insert "\n"))))
(put-text-property start (point) 'face 'shortdoc-example))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ed378c9: Use Unicode arrows in shortdoc results,
Lars Ingebrigtsen <=