Received: (at 80262) by debbugs.gnu.org; 26 Jan 2026 12:16:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 26 07:16:51 2026 Received: from localhost ([127.0.0.1]:41213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vkLWV-0002lu-CI for submit <at> debbugs.gnu.org; Mon, 26 Jan 2026 07:16:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36398) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vkLWT-0002lZ-OA for 80262 <at> debbugs.gnu.org; Mon, 26 Jan 2026 07:16:50 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vkLWN-0007x1-AU; Mon, 26 Jan 2026 07:16:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=P9d+qS1r/wacWg44C1RPp52tzJJRaDYwVGILx8bYxF0=; b=g+PSYPikhzwZ +qBUd9/nzXF+wYmBl/ZXa7qJEathkd3aywelPno4sdXYBgILRJsIgxYB0oVsRb0lRO0Ca45rg9hXq sFxXiBiiAtO8h36ounVJKqbvuLHfsNfE/0BLYyMnOoEmMNK/URK1tWEYthLPoPgMM4Wn9YE1NWf00 dhrbfaXr+HluzyPbZAmG1CWcB109z1tsYk7d79QQEI/+8vsnLuf/W5u0GRZ6D2zDipGTPI1z8GojZ zelQFrqO05qkljnVCH8rKsBGv5kxHxd0jurvk69eWeBOlM22EeS21hlaU0lNenza5f0RcKVUe5TlL qkpUDiKTaYjLraj5Y9omYw==; Date: Mon, 26 Jan 2026 14:16:40 +0200 Message-Id: <86y0lkd0wn.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Jens Schmidt <jschmidt4gnu@HIDDEN> In-Reply-To: <87ikcpv983.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN) Subject: Re: bug#80262: [PATCH] Add 'char' shortdoc group References: <87ikcpv983.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 80262 Cc: 80262 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Sun, 25 Jan 2026 19:27:24 +0100 > From: Jens Schmidt via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > Today I have been looking for a function to determine the > upper/lowercase-ness of a character. I found it, rather misplaced, as > `char-uppercase-p' in shortdoc group `string', and decided to make my > first shortdoc group `char'. See attached patch. > > I deliberately kept examples and output so that it would show, for > example, `?a' instead of `97' to keep things more readable. > > If you think that group is lacking some important character functions or > includes some that are too fancy, please let me know. Likewise if we'd > need a NEWS entry for that. I think this is a good idea, but I would add a few more functions and variables to this group: char-acronym-table char-category-set char-script-table script-representative-chars char-code-property-table char-code-property-description char-displayable-p char-fold char-or-string-p char-syntax describe-character-set Thanks.
bug-gnu-emacs@HIDDEN:bug#80262; Package emacs.
Full text available.Received: (at 80262) by debbugs.gnu.org; 25 Jan 2026 20:43:24 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 25 15:43:24 2026 Received: from localhost ([127.0.0.1]:57036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vk6x9-0007mU-P9 for submit <at> debbugs.gnu.org; Sun, 25 Jan 2026 15:43:24 -0500 Received: from mr5.vodafonemail.de ([145.253.228.165]:36408) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <jschmidt4gnu@HIDDEN>) id 1vk6x6-0007m1-HV for 80262 <at> debbugs.gnu.org; Sun, 25 Jan 2026 15:43:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-23sep; t=1769373793; bh=lELQcHACiyD7moCUcQmwV3fbpHzMaRrSMYpLMDrm6uQ=; h=Message-ID:Date:User-Agent:Subject:To:References:From: Content-Language:In-Reply-To:Content-Type:From; b=zaFgHyRrsKaL4xKOxWP4ts48YCs5oTYBquzNEhud5B9UCULXML+lTwLPn+0IwZGBT SKrcshxXa7drFdgH9v+lvBa0IFvUIZvP0+zwKhD19DI24OW5Pq1UnQekCZg7eJHZZR BX84AAzancoEV62a2/R4BVLxKzUYclPUr6lTRN5A= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr5.vodafonemail.de (Postfix) with ESMTPS id 4dzkC55grMz1yH2; Sun, 25 Jan 2026 20:43:13 +0000 (UTC) Received: from [192.168.178.41] (unknown [62.246.244.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4dzkC22sklz904s; Sun, 25 Jan 2026 20:43:07 +0000 (UTC) Message-ID: <9f60ae89-ecba-4e73-83f5-e200fc6ca9af@HIDDEN> Date: Sun, 25 Jan 2026 21:43:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#80262: [PATCH] Add 'char' shortdoc group To: Philip Kaludercic <philipk@HIDDEN> References: <87ikcpv983.fsf@HIDDEN> <87ms21wl42.fsf@HIDDEN> From: Jens Schmidt <jschmidt4gnu@HIDDEN> Content-Language: de-DE-frami, en-US In-Reply-To: <87ms21wl42.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-purgate-server: smtpa03 X-purgate-type: clean X-purgate: clean X-purgate-size: 739 X-purgate-ID: 155817::1769373793-1FD9DFA6-5D3F70F8/0/0 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 80262 Cc: 80262 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On 2026-01-25 20:25, Philip Kaludercic wrote: >> I deliberately kept examples and output so that it would show, for >> example, `?a' instead of `97' to keep things more readable. > > Do you think that `print-integers-as-characters' could be used to > improve this? That's the one part of the puzzle I've been looking for, thanks. The other part would be some shortdoc property to set that variable for printing the example (`:example-filter' ?) and the result (`:result-filter' ?). I'll check and see how that would look like in practice and come up with another patch. (It would be a second patch, since there are quite some number of existing shortdoc examples that would benefit from such a a feature as well.)
bug-gnu-emacs@HIDDEN:bug#80262; Package emacs.
Full text available.
Received: (at 80262) by debbugs.gnu.org; 25 Jan 2026 19:25:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 25 14:25:29 2026
Received: from localhost ([127.0.0.1]:56071 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vk5jl-0002dA-66
for submit <at> debbugs.gnu.org; Sun, 25 Jan 2026 14:25:29 -0500
Received: from mout02.posteo.de ([185.67.36.66]:57185)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <philipk@HIDDEN>)
id 1vk5jh-0002cl-HF
for 80262 <at> debbugs.gnu.org; Sun, 25 Jan 2026 14:25:26 -0500
Received: from submission (posteo.de [185.67.36.169])
by mout02.posteo.de (Postfix) with ESMTPS id EE0E3240103
for <80262 <at> debbugs.gnu.org>; Sun, 25 Jan 2026 20:25:18 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017;
t=1769369118; bh=PnpUJKq7LJyZKVkzQx3ClvCNdvSY6QKZ6g4LEvhz6c0=;
h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version:
Content-Type:Content-Transfer-Encoding:From;
b=DB8EAJUgZWyCOuzGrUQC5VQL6eo/QashOP3sUorsSjP50m1WGCq0OAq3eNqK88vt9
rmDE5yLVOjQv/E7n+CgFX8l+fJl4WAsnMt7KztjGJKODgCdqgzBhJHcYZUBG2OMWhm
DAL2AwnNjktVEhsG8E077gxWLqH0XS1Fpb1jikBBvQ8LPD5jvqol/Kd5rvgmshDXmf
TjiTDB/k5oATw2JaWndONDxfvQvpwLVn61abTPw862OpasBC0oo5C0Nxf55eO0E4MU
veScBO0Vk+ZRtGabBOkJAYV+Q/445zdVdbX3n6wsYcjN9qAo8JIF6ANs5C0ppYBDqz
Noa7Gq9taiSqw==
Received: from customer (localhost [127.0.0.1])
by submission (posteo.de) with ESMTPSA id 4dzhTB2P7yz6v13;
Sun, 25 Jan 2026 20:25:18 +0100 (CET)
From: Philip Kaludercic <philipk@HIDDEN>
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
Subject: Re: bug#80262: [PATCH] Add 'char' shortdoc group
In-Reply-To: <87ikcpv983.fsf@HIDDEN>
References: <87ikcpv983.fsf@HIDDEN>
OpenPGP: id=philipk@HIDDEN;
url="https://keys.openpgp.org/vks/v1/by-email/philipk@HIDDEN";
preference=signencrypt
Date: Sun, 25 Jan 2026 19:25:18 +0000
Message-ID: <87ms21wl42.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80262
Cc: 80262 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
Jens Schmidt via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@HIDDEN> writes:
> Tags: patch
>
> Today I have been looking for a function to determine the
> upper/lowercase-ness of a character. I found it, rather misplaced, as
> `char-uppercase-p' in shortdoc group `string', and decided to make my
> first shortdoc group `char'. See attached patch.
>
> I deliberately kept examples and output so that it would show, for
> example, `?a' instead of `97' to keep things more readable.
Do you think that `print-integers-as-characters' could be used to
improve this?
> If you think that group is lacking some important character functions or
> includes some that are too fancy, please let me know. Likewise if we'd
> need a NEWS entry for that.
>
> Thanks!
>
> In GNU Emacs 31.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.49, cairo version 1.18.4) of 2026-01-25 built on sappc2
> Repository revision: 3b547e4f5dc99dc157b52a059cf234f7a5d15112
> Repository branch: extend-shortdocs-with-char-group
> Windowing system distributor 'The X.Org Foundation', version 11.0.12401006
> System Description: Debian GNU/Linux 13 (trixie)
>
> Configured using:
> 'configure -C --build x86_64-linux-gnu --sharedstatedir=3D/var/lib
> --localstatedir=3D/var/lib --with-libsystemd --with-pop=3Dyes
> --with-sound=3Dalsa --without-gconf --with-mailutils --with-cairo
> --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars
> build_alias=3Dx86_64-linux-gnu'
>
> From 0ddeb26eebd30650b8d43e2c4a6335651696a700 Mon Sep 17 00:00:00 2001
> From: Jens Schmidt <jschmidt4gnu@HIDDEN>
> Date: Sun, 25 Jan 2026 18:58:18 +0100
> Subject: [PATCH] Add 'char' shortdoc group
>
> * lisp/emacs-lisp/shortdoc.el (char): New group.
> (string): Remove function 'char-uppercase-p'. (bug#XXXXX)
> ---
> lisp/emacs-lisp/shortdoc.el | 61 +++++++++++++++++++++++++++++++++++--
> 1 file changed, 58 insertions(+), 3 deletions(-)
>
> diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
> index 70583e08dbd..7f0e9003f77 100644
> --- a/lisp/emacs-lisp/shortdoc.el
> +++ b/lisp/emacs-lisp/shortdoc.el
> @@ -305,6 +305,62 @@ map
> :eval (map-into '((5 . 6) (7 . 8)) 'plist)
> :eval (map-into '((5 . 6) (7 . 8)) 'hash-table)))
>=20=20
> +(define-short-documentation-group char
> + ;; Where easily possible and not strictly necessary, avoid the
> + ;; integer representation of characters in examples or results,
> + ;; even if that is what `prin1' would generate.
> + "Predicates for Characters"
> + (characterp
> + :eval "(characterp ?a)"
> + :eval (characterp 97)
> + :eval (characterp "a"))
> + (char-or-string-p
> + :eval "(char-or-string-p ?a)"
> + :eval (char-or-string-p 97)
> + :eval (char-or-string-p "a"))
> + (char-equal
> + :eval "(char-equal ?x ?x)"
> + :eval "(char-equal ?x ?X)"
> + :eval "(let ((case-fold-search nil)) (char-equal ?x ?X))"
> + :eval "(let ((case-fold-search t)) (char-equal ?x ?X))")
> + (char-uppercase-p
> + :eval "(char-uppercase-p ?A)"
> + :eval "(char-uppercase-p ?a)")
> + "Converting Characters"
> + ;; Do not document semi-obsolete `char-to-string' and `string-to-char'
> + ;; here.
> + (aref
> + :no-eval (aref "abc" 0)
> + :result-string "?a")
> + (string
> + :eval "(string ?a)")
> + "Case Manipulation"
> + (upcase
> + :no-eval "(upcase ?x)"
> + :result-string "?X")
> + (downcase
> + :no-eval "(downcase ?X)"
> + :result-string "?x")
> + "Data About Characters"
> + (char-charset
> + :args (ch)
> + :eval "(char-charset ?a)"
> + :eval "(char-charset ?=C3=A4)"
> + :eval "(char-charset ?=F0=9F=A7=91)")
> + (char-to-name
> + :eval "(char-to-name ?a)"
> + :eval "(char-to-name ?=F0=9F=A7=91)")
> + (char-width
> + :eval "(char-width ?a)"
> + :eval "(char-width ?=F0=9F=A7=91)"
> + :eval "(char-width ?\\N{ZERO WIDTH SPACE})")
> + "Making Characters"
> + (char-from-name
> + :no-eval "(char-from-name \"LATIN SMALL LETTER A\")"
> + :result-string "?a"
> + :no-eval "(char-from-name \"ADULT\")"
> + :result-string "?=F0=9F=A7=91"))
> +
> (define-short-documentation-group string
> "Making Strings"
> (make-string
> @@ -445,15 +501,14 @@ string
> (upcase-initials
> :eval (upcase-initials "The CAT in the hAt"))
> "Converting Strings"
> + ;; Do not document semi-obsolete `char-to-string' and `string-to-char'
> + ;; here.
> (string-to-number
> :eval (string-to-number "42")
> :eval (string-to-number "deadbeef" 16)
> :eval (string-to-number "2.5e+03"))
> (number-to-string
> :eval (number-to-string 42))
> - (char-uppercase-p
> - :eval "(char-uppercase-p ?A)"
> - :eval "(char-uppercase-p ?a)")
> "Data About Strings"
> (length
> :eval (length "foo")
bug-gnu-emacs@HIDDEN:bug#80262; Package emacs.
Full text available.
Received: (at submit) by debbugs.gnu.org; 25 Jan 2026 18:27:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 25 13:27:44 2026
Received: from localhost ([127.0.0.1]:55330 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vk4ps-000736-9b
for submit <at> debbugs.gnu.org; Sun, 25 Jan 2026 13:27:44 -0500
Received: from lists.gnu.org ([2001:470:142::17]:54922)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <jschmidt4gnu@HIDDEN>)
id 1vk4pp-00072X-Rx
for submit <at> debbugs.gnu.org; Sun, 25 Jan 2026 13:27:43 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <jschmidt4gnu@HIDDEN>)
id 1vk4ph-0007FN-FF
for bug-gnu-emacs@HIDDEN; Sun, 25 Jan 2026 13:27:33 -0500
Received: from mr4.vodafonemail.de ([145.253.228.164])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <jschmidt4gnu@HIDDEN>)
id 1vk4pe-0001cz-TV
for bug-gnu-emacs@HIDDEN; Sun, 25 Jan 2026 13:27:33 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
s=vfde-mb-mr2-23sep; t=1769365648;
bh=5SlMZ2un3iymjFEOi/FSJU+gSUIl8Tpkh/dk1VhI3EM=;
h=From:To:Subject:Date:Message-ID:Content-Type:From;
b=y3AiV46bBW9clt5rp9MFdK/6BJTshrBVM3EnlI6ZkUp+u93tFBAtnzRGhw9bzw93S
mvrgRpGtjAUw3yoWk5EyGOB/KIz8QtfN4+OfVoS7jNBiq01GE8aB+yDz13qN1/mwFu
IMmY5nSu6gkr3fGurGFDaMOATd804cZK7pzBRkb0=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits))
(No client certificate requested)
by mr4.vodafonemail.de (Postfix) with ESMTPS id 4dzgBS31g8z1yHf
for <bug-gnu-emacs@HIDDEN>; Sun, 25 Jan 2026 18:27:28 +0000 (UTC)
Received: from sappc2 (unknown [62.246.244.32])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
server-digest SHA256) (No client certificate requested)
by smtp.vodafone.de (Postfix) with ESMTPSA id 4dzgBS04hkz8snY
for <bug-gnu-emacs@HIDDEN>; Sun, 25 Jan 2026 18:27:24 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Add 'char' shortdoc group
X-Debbugs-Cc:
Date: Sun, 25 Jan 2026 19:27:24 +0100
Message-ID: <87ikcpv983.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-purgate-server: smtpa06
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 4706
X-purgate-ID: 155817::1769365648-E89BF615-707C813E/0/0
Received-SPF: pass client-ip=145.253.228.164;
envelope-from=jschmidt4gnu@HIDDEN; helo=mr4.vodafonemail.de
X-Spam_score_int: -37
X-Spam_score: -3.8
X-Spam_bar: ---
X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01,
RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
--=-=-=
Content-Type: text/plain
Tags: patch
Today I have been looking for a function to determine the
upper/lowercase-ness of a character. I found it, rather misplaced, as
`char-uppercase-p' in shortdoc group `string', and decided to make my
first shortdoc group `char'. See attached patch.
I deliberately kept examples and output so that it would show, for
example, `?a' instead of `97' to keep things more readable.
If you think that group is lacking some important character functions or
includes some that are too fancy, please let me know. Likewise if we'd
need a NEWS entry for that.
Thanks!
In GNU Emacs 31.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version
3.24.49, cairo version 1.18.4) of 2026-01-25 built on sappc2
Repository revision: 3b547e4f5dc99dc157b52a059cf234f7a5d15112
Repository branch: extend-shortdocs-with-char-group
Windowing system distributor 'The X.Org Foundation', version 11.0.12401006
System Description: Debian GNU/Linux 13 (trixie)
Configured using:
'configure -C --build x86_64-linux-gnu --sharedstatedir=/var/lib
--localstatedir=/var/lib --with-libsystemd --with-pop=yes
--with-sound=alsa --without-gconf --with-mailutils --with-cairo
--with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
build_alias=x86_64-linux-gnu'
--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: attachment; filename=0001-Add-char-shortdoc-group.patch
Content-Transfer-Encoding: quoted-printable
From 0ddeb26eebd30650b8d43e2c4a6335651696a700 Mon Sep 17 00:00:00 2001
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
Date: Sun, 25 Jan 2026 18:58:18 +0100
Subject: [PATCH] Add 'char' shortdoc group
* lisp/emacs-lisp/shortdoc.el (char): New group.
(string): Remove function 'char-uppercase-p'. (bug#XXXXX)
---
lisp/emacs-lisp/shortdoc.el | 61 +++++++++++++++++++++++++++++++++++--
1 file changed, 58 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index 70583e08dbd..7f0e9003f77 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -305,6 +305,62 @@ map
:eval (map-into '((5 . 6) (7 . 8)) 'plist)
:eval (map-into '((5 . 6) (7 . 8)) 'hash-table)))
=20
+(define-short-documentation-group char
+ ;; Where easily possible and not strictly necessary, avoid the
+ ;; integer representation of characters in examples or results,
+ ;; even if that is what `prin1' would generate.
+ "Predicates for Characters"
+ (characterp
+ :eval "(characterp ?a)"
+ :eval (characterp 97)
+ :eval (characterp "a"))
+ (char-or-string-p
+ :eval "(char-or-string-p ?a)"
+ :eval (char-or-string-p 97)
+ :eval (char-or-string-p "a"))
+ (char-equal
+ :eval "(char-equal ?x ?x)"
+ :eval "(char-equal ?x ?X)"
+ :eval "(let ((case-fold-search nil)) (char-equal ?x ?X))"
+ :eval "(let ((case-fold-search t)) (char-equal ?x ?X))")
+ (char-uppercase-p
+ :eval "(char-uppercase-p ?A)"
+ :eval "(char-uppercase-p ?a)")
+ "Converting Characters"
+ ;; Do not document semi-obsolete `char-to-string' and `string-to-char'
+ ;; here.
+ (aref
+ :no-eval (aref "abc" 0)
+ :result-string "?a")
+ (string
+ :eval "(string ?a)")
+ "Case Manipulation"
+ (upcase
+ :no-eval "(upcase ?x)"
+ :result-string "?X")
+ (downcase
+ :no-eval "(downcase ?X)"
+ :result-string "?x")
+ "Data About Characters"
+ (char-charset
+ :args (ch)
+ :eval "(char-charset ?a)"
+ :eval "(char-charset ?=C3=A4)"
+ :eval "(char-charset ?=F0=9F=A7=91)")
+ (char-to-name
+ :eval "(char-to-name ?a)"
+ :eval "(char-to-name ?=F0=9F=A7=91)")
+ (char-width
+ :eval "(char-width ?a)"
+ :eval "(char-width ?=F0=9F=A7=91)"
+ :eval "(char-width ?\\N{ZERO WIDTH SPACE})")
+ "Making Characters"
+ (char-from-name
+ :no-eval "(char-from-name \"LATIN SMALL LETTER A\")"
+ :result-string "?a"
+ :no-eval "(char-from-name \"ADULT\")"
+ :result-string "?=F0=9F=A7=91"))
+
(define-short-documentation-group string
"Making Strings"
(make-string
@@ -445,15 +501,14 @@ string
(upcase-initials
:eval (upcase-initials "The CAT in the hAt"))
"Converting Strings"
+ ;; Do not document semi-obsolete `char-to-string' and `string-to-char'
+ ;; here.
(string-to-number
:eval (string-to-number "42")
:eval (string-to-number "deadbeef" 16)
:eval (string-to-number "2.5e+03"))
(number-to-string
:eval (number-to-string 42))
- (char-uppercase-p
- :eval "(char-uppercase-p ?A)"
- :eval "(char-uppercase-p ?a)")
"Data About Strings"
(length
:eval (length "foo")
--=20
2.47.3
--=-=-=--
Jens Schmidt <jschmidt4gnu@HIDDEN>:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#80262; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.