master 5cd67dd31e1 09/12: Merge from origin/emacs-31
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: master commit 5cd67dd31e19afd1b0919e1ec547a13cee1a06c5 Merge: feac7c90ed1 9448f8e3dd3 Author: Eli Zaretskii <[email protected]> Commit: Eli Zaretskii <[email protected]> Merge from origin/emacs-31 9448f8e3dd3 ; Improve documentation of 'char-uppercase-p' --- doc/lispref/display.texi | 6 ++++-- lisp/simple.el | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 5704103ced9..80cbd0cb5f0 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -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 diff --git a/lisp/simple.el b/lisp/simple.el index 1f7d57f299a..92666bcfa4f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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))))