[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: describe-char-fold-equivalences
From: |
Robert Pluim |
Subject: |
Re: describe-char-fold-equivalences |
Date: |
Mon, 09 Jan 2023 16:54:01 +0100 |
>>>>> On Mon, 09 Jan 2023 07:31:17 -0800, "T.V Raman" <raman@google.com> said:
T> thanks for the explanation.
T> Perhaps we could make that more discoverable when reading the output of
T> that function ie the doc string I complained about?
Yes. Something like this for emacs-29?
diff --git a/lisp/char-fold.el b/lisp/char-fold.el
index eff2f5558b3..f1da7997407 100644
--- a/lisp/char-fold.el
+++ b/lisp/char-fold.el
@@ -436,7 +436,24 @@ describe-char-fold-equivalences
describe all available character equivalences of `char-fold-to-regexp'.
Optional argument LAX (interactively, the prefix argument), if
non-nil, means also include partially matching ligatures and
-non-canonical equivalences."
+non-canonical equivalences.
+
+Each line of the display shows the equivalences in two different
+ways separated by a colon:
+
+ - as the literal character or sequence
+ - using an ASCII-only escape syntax
+
+For example, for the letter 'r', the first line is
+
+ r: ?\N{LATIN SMALL LETTER R}
+
+which is for the requested character itself, and a later line has
+
+ ṟ: ?\N{LATIN SMALL LETTER R}?\N{COMBINING MACRON BELOW}
+
+which clearly shows what the constituent characters are."
(interactive (list (ignore-errors
(read-char-by-name
(format-prompt "Unicode name, single char, or hex"