From: Robert Pluim <rpluim@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: emacs-28 a866674b2a: Fix inaccuracies in "lax search" documentation
Date: Tue, 26 Jul 2022 09:59:07 +0200 [thread overview]
Message-ID: <87ilnk8fuc.fsf@gmail.com> (raw)
In-Reply-To: <867d41dlc8.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 25 Jul 2022 22:49:11 +0300")
>>>>> On Mon, 25 Jul 2022 22:49:11 +0300, Juri Linkov <juri@linkov.net> said:
>>>> > Should we make `char-fold-to-regexp' into a command and refer to it
>>>> > from here? Or add something like `char-fold-show-equivalences'?
>>>>
>>>> A better name would be `describe-char-fold'.
>>>
>>> For a command, I'd say describe-character-foldings. But
>>> char-fold-show-equivalences is IMO a better name.
>>
>> All similar commands have names starting with the `describe-' prefix like
>> `describe-char', `describe-character-set'. So maybe then
>> `describe-char-fold-equivalences'.
Juri> Ok, then let's use describe-char-fold-equivalences:
Ah, that lists *all* the equivalences. I was thinking more along the
lines of the following (we can give it a different name, or combine them)
(defun char-fold-char-equivalences (char &optional lax)
"Display characters equivalent to CHAR.
Prompt for CHAR. Interactively, a prefix arg means also include
any ligatures that CHAR partially matches."
(interactive (list (read-char-by-name "Character (Unicode name or hex): ")
current-prefix-arg))
(require 'help-fns)
(let ((help-buffer-under-preparation t))
(help-setup-xref (list #'describe-char-fold-equivalences)
(called-interactively-p 'interactive))
(let* ((equivalences nil)
(char-fold--no-regexp t)
(table (char-fold--make-table))
(extra (aref (char-table-extra-slot table 0) char)))
(setq equivalences (aref table char))
(when lax
(setq equivalences (append equivalences
(mapcar (lambda (entry)
(cdr entry))
extra))))
(setq equivalences (cons (char-to-string char) equivalences))
(with-help-window (help-buffer)
(with-current-buffer standard-output
(insert (mapconcat
(lambda (c)
(format "%s: \?\\N{%s}\n"
c
(or (get-char-code-property (string-to-char c) 'name)
(get-char-code-property (string-to-char c) 'old-name))))
equivalences)))))))
Robert
--
next prev parent reply other threads:[~2022-07-26 7:59 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <165875050243.3275.8867100069985547389@vcs2.savannah.gnu.org>
[not found] ` <20220725120142.D1283C0F203@vcs2.savannah.gnu.org>
2022-07-25 13:01 ` emacs-28 a866674b2a: Fix inaccuracies in "lax search" documentation Robert Pluim
2022-07-25 13:43 ` Eli Zaretskii
2022-07-25 14:48 ` Robert Pluim
2022-07-25 16:02 ` Eli Zaretskii
2022-07-26 12:52 ` Robert Pluim
2022-07-26 13:16 ` Eli Zaretskii
2022-07-26 14:23 ` Robert Pluim
2022-07-26 16:06 ` Eli Zaretskii
2022-07-26 16:54 ` Robert Pluim
2022-07-26 17:15 ` Eli Zaretskii
2022-07-27 7:54 ` Robert Pluim
2022-07-27 11:32 ` Eli Zaretskii
2022-07-25 17:52 ` Juri Linkov
2022-07-25 18:15 ` Eli Zaretskii
2022-07-25 18:42 ` Juri Linkov
2022-07-25 19:49 ` Juri Linkov
2022-07-26 7:59 ` Robert Pluim [this message]
2022-07-26 12:16 ` Eli Zaretskii
2022-07-27 7:46 ` Juri Linkov
2022-07-27 8:13 ` Robert Pluim
2022-07-27 11:32 ` Eli Zaretskii
2022-07-27 18:54 ` Juri Linkov
2022-07-27 19:23 ` Eli Zaretskii
2022-07-27 19:55 ` Juri Linkov
2022-07-28 5:40 ` Eli Zaretskii
2022-07-28 6:07 ` Eli Zaretskii
2022-07-28 7:13 ` Juri Linkov
2022-07-28 7:56 ` Eli Zaretskii
2022-07-28 7:10 ` Juri Linkov
2022-07-28 7:55 ` Eli Zaretskii
2022-07-28 19:40 ` Juri Linkov
2022-08-30 7:29 ` Juri Linkov
2022-08-31 8:49 ` Robert Pluim
2022-08-31 16:09 ` Juri Linkov
2022-08-31 16:36 ` Robert Pluim
2022-08-31 16:40 ` Eli Zaretskii
2022-08-31 16:56 ` Robert Pluim
2022-08-31 17:13 ` Juri Linkov
2022-08-31 17:22 ` Eli Zaretskii
2022-08-31 17:26 ` Robert Pluim
2022-08-31 17:29 ` [External] : " Drew Adams
2022-08-31 18:04 ` Juri Linkov
2022-08-31 20:14 ` Stefan Monnier
2022-09-01 7:22 ` Juri Linkov
2022-09-01 8:14 ` Robert Pluim
2022-09-01 11:34 ` Eli Zaretskii
2022-09-01 12:23 ` Robert Pluim
2022-09-01 13:00 ` Stefan Monnier
2022-09-01 13:07 ` Robert Pluim
2022-09-01 15:28 ` Robert Pluim
2022-09-01 15:30 ` Eli Zaretskii
2022-09-01 15:58 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ilnk8fuc.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.