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

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

[debbugs-tracker] bug#13698: closed (24.2; Display script symbol name wh


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#13698: closed (24.2; Display script symbol name when calling `describe-char')
Date: Wed, 13 Feb 2013 14:58:02 +0000

Your message dated Wed, 13 Feb 2013 09:56:38 -0500
with message-id <address@hidden>
and subject line Re: bug#13698: 24.2; Display script symbol name when calling 
`describe-char'
has caused the debbugs.gnu.org bug report #13698,
regarding 24.2; Display script symbol name when calling `describe-char'
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
13698: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13698
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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

--- End Message ---
--- Begin Message --- Subject: Re: bug#13698: 24.2; Display script symbol name when calling `describe-char' Date: Wed, 13 Feb 2013 09:56:38 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
>> I also wrote a simple patch for this.
> I improved this patch.
> If a char doesn't belong to any script, now `describe-char' do not show
> script entity, rather than display "script: nil".

Thank you.  I installed this into trunk so it'll be in Emacs 24.4.
I also replaced char-table-range with aref which works as well here.


        Stefan


--- End Message ---

reply via email to

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