From: Robert Pluim <rpluim@gmail.com>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
spwhitton@spwhitton.name, 54804@debbugs.gnu.org,
uyennhi.qm@gmail.com
Subject: bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter
Date: Wed, 11 May 2022 17:00:13 +0200 [thread overview]
Message-ID: <87lev85d36.fsf@gmail.com> (raw)
In-Reply-To: <87fslgnn9h.fsf@gmail.com> (Tino Calancha's message of "Wed, 11 May 2022 16:43:06 +0200")
>>>>> On Wed, 11 May 2022 16:43:06 +0200, Tino Calancha <tino.calancha@gmail.com> said:
Tino> Eli Zaretskii <eliz@gnu.org> writes:
>>> Is it the following implementation OK for such a function?
>>
>> Yes, thanks. But please call it char-uppercase-p ("upcase" has the
>> meaning of making a character upper-case).
Tino> I'd like to add this `char-uppercase-p'.
Tino> Once merged, I will finish with the goal of the report.
Tino> I appreciate a hand with the documentation part.
Youʼre *asking* us to nit-pick? Youʼre a brave person ☺️
Tino> commit aa270a4b8813ac226a61d8e6919f68e9e4ed0973
Tino> Author: Tino Calancha <tino.calancha@gmail.com>
Tino> Date: Wed May 11 16:34:33 2022 +0200
Tino> char-uppercase-p: New predicate
Tino> Return non-nil if its argument is an upper-case unicode character.
Tino> Suggested in Bug#54804.
Tino> * lisp/subr.el (char-uppercase-p): New defun.
Tino> * etc/NEWS (Lisp Changes in Emacs 29.1): Announce it
Tino> * doc/lispref/display.texi (Size of Displayed Text): Document it.
Tino> * test/lisp/subr-tests.el (test-char-uppercase-p): Add a test.
Tino> diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
Tino> index 9650d22790..1c32458d62 100644
Tino> --- a/doc/lispref/display.texi
Tino> +++ b/doc/lispref/display.texi
Tino> @@ -2010,6 +2010,14 @@ Size of Displayed Text
Tino> (@pxref{Usual Display}).
Tino> @end defun
Tino> +@defun char-uppercase-p char
Tino> +This function returns non-nil if @var{char} is an uppercase unicode
Tino> +character. Be aware that if the Unicode tables are not yet available,
Tino> +e.g. during bootstrap, then this function gives the right answer only
Tino> +for @acronym{ASCII} characters; for other characters the function
Tino> +unconditionally returns @code{nil}.
Tino> +@end defun
Tino> +
Be active: 'Return non-nil if ...'. So:
Return non-@code{nil} if @var{char} is an uppercase character
according to Unicode. Be aware that if the Unicode tables are not yet
available, e.g. during bootstrap, this gives the correct answer only
for @acronym{ASCII} characters; for other characters it always returns
@code{nil}.
Tino> @defun string-width string &optional from to
Tino> This function returns the width in columns of the string @var{string},
Tino> if it were displayed in the current buffer and the selected window.
Tino> diff --git a/etc/NEWS b/etc/NEWS
Tino> index 991088a067..57c254bce8 100644
Tino> --- a/etc/NEWS
Tino> +++ b/etc/NEWS
Tino> @@ -1794,6 +1794,10 @@ value. The byte compiler will now issue a warning if it encounters
Tino> these forms.
Tino> ++++
Tino> +*** The new predicate 'char-uppercase-p' returns non-nil if its
Tino> +argument its an uppercase unicode character.
The header line should fit on one line. So
*** New predicate 'char-uppercase-p'.
This returns...
Tino> +
Tino> +++
Tino> *** 'restore-buffer-modified-p' can now alter buffer auto-save state.
Tino> With a FLAG value of 'autosaved', it will mark the buffer as having
Tino> diff --git a/lisp/simple.el b/lisp/simple.el
Tino> index 89fb0ea97e..525e636ab6 100644
Tino> --- a/lisp/simple.el
Tino> +++ b/lisp/simple.el
Tino> @@ -6054,6 +6054,14 @@ backward-delete-char-untabify
Tino> ;; Avoid warning about delete-backward-char
Tino> (with-no-warnings (delete-backward-char n killp))))
Tino> +(defun char-uppercase-p (char)
Tino> + "Return non-nil if CHAR is an upper-case unicode character.
Tino> +If the Unicode tables are not yet available, e.g. during bootstrap,
Tino> +then the function restricts to the ASCII character set."
Iʼd say 'gives correct answers only for ASCII characters'
Robert
--
next prev parent reply other threads:[~2022-05-11 15:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 22:03 bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter Tino Calancha
2022-04-09 6:03 ` Eli Zaretskii
2022-04-16 10:58 ` Tino Calancha
2022-04-16 11:33 ` Eli Zaretskii
2022-05-09 16:17 ` Sean Whitton
2022-05-10 21:14 ` Tino Calancha
2022-05-11 11:15 ` Eli Zaretskii
2022-05-11 14:43 ` Tino Calancha
2022-05-11 14:50 ` Lars Ingebrigtsen
2022-05-11 15:00 ` Robert Pluim [this message]
2022-05-11 15:19 ` Tino Calancha
2022-05-11 15:27 ` Andreas Schwab
2022-05-11 15:38 ` Tino Calancha
2022-05-11 16:11 ` Andreas Schwab
2022-05-11 16:18 ` Tino Calancha
2022-05-12 15:55 ` Tino Calancha
2022-05-13 6:48 ` Eli Zaretskii
2022-05-17 12:34 ` Tino Calancha
2022-05-17 12:41 ` Eli Zaretskii
2022-05-17 12:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-17 12:53 ` Tino Calancha
2022-05-17 13:38 ` Eli Zaretskii
2022-05-17 14:31 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-17 19:32 ` Juri Linkov
2022-05-18 7:25 ` Tino Calancha
2022-05-20 22:59 ` Sean Whitton
2022-05-21 5:38 ` Eli Zaretskii
2022-05-21 9:30 ` Tino Calancha
2022-05-21 18:53 ` Sean Whitton
2022-05-11 15:57 ` Eli Zaretskii
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=87lev85d36.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=54804@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=spwhitton@spwhitton.name \
--cc=tino.calancha@gmail.com \
--cc=uyennhi.qm@gmail.com \
/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.