; Improve documentation of 'char-uppercase-p'

* doc/lispref/display.texi (Size of Displayed Text):
* lisp/simple.el (char-uppercase-p): Clarify "uppercase
character".
This commit is contained in:
Eli Zaretskii 2026-08-14 14:27:58 +03:00
parent f6e3b4232f
commit 9448f8e3dd
2 changed files with 7 additions and 3 deletions

View file

@ -2214,8 +2214,10 @@ Tables}). The width of a tab character is usually @code{tab-width}
@end defun
@defun char-uppercase-p char
Return non-@code{nil} if @var{char} is an uppercase character
according to Unicode.
Return non-@code{nil} if @var{char} is an upper-case character
according to Unicode. Note that a character is considered to be
upper-case if the Unicode Standard defines a corresponding lower-case
character.
@end defun
@defun string-width string &optional from to

View file

@ -6684,8 +6684,10 @@ and KILLP is t if a prefix arg was specified."
(defun char-uppercase-p (char)
"Return non-nil if CHAR is an upper-case character.
A character is considered upper-case if there's a correspoding
lower-case character.
If the Unicode tables are not yet available, e.g. during bootstrap,
then gives correct answers only for ASCII characters."
this function gives correct return values only for ASCII characters."
(cond ((unicode-property-table-internal 'lowercase)
(characterp (get-char-code-property char 'lowercase)))
((<= ?A char ?Z))))