bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13698: 24.2; Display script symbol name when calling `describe-char'


From: YE Qianchuan
Subject: bug#13698: 24.2; Display script symbol name when calling `describe-char'
Date: Wed, 13 Feb 2013 01:30:41 +0800

Please refer to this thread:
https://lists.gnu.org/archive/html/help-gnu-emacs/2013-02/msg00138.html

Sometimes the script name symbol of a character is more important than
its charset.  For example, you'd like to use `set-fontset-font' to set a
proper font specifying its script as target, rather than specifying its
charset, which usually is unicode.

In addition, as unicode family is a common charset, the "preferred
charset" displayed by `describe-char' seems not quite useful. In
contrast, script makes more sense. For example, script 'han tells me this
is a CJK character and 'greek tells me this is a greek letter, while
charset often tells me nothing.

Therefore, I suggest display the script name symbol as well when calling
`describe-char'. So that we can press [C-u C-x =] to get it.

I also wrote a simple patch for this.

Besides, I hope there is a handy function called
`list-character-scripts', just like `list-character-sets'. It's a really
simple function: just return
(char-table-extra-slot char-script-table 0).
I believe this function will make script name symbols less confuse.

diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index b3f7878..6f34a7c 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -574,6 +574,9 @@ relevant to POS."
                         'help-echo
                         "mouse-2, RET: show this character in its character 
set")
                     str)))
+              ("script"
+               ,(symbol-name
+                 (char-table-range char-script-table char)))
               ("syntax"
                ,(let ((syntax (syntax-after pos)))
                   (with-temp-buffer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]