From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63861: [PATCH] pp.el: New "pretty printing" code Date: Sat, 17 Jun 2023 08:39:07 +0300 Message-ID: <83h6r6sl50.fsf@gnu.org> References: <83fs799jmi.fsf@gnu.org> <83r0qs74qs.fsf@gnu.org> <83pm5zws19.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2721"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63861@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 17 07:40:25 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qAOfg-0000ZT-RP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Jun 2023 07:40:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAOfV-00083v-Gc; Sat, 17 Jun 2023 01:40:13 -0400 Original-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 ) id 1qAOfK-000839-SC for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 01:40:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAOfK-00070m-CJ for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 01:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAOfJ-0004US-Qj for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 01:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Jun 2023 05:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63861 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63861-submit@debbugs.gnu.org id=B63861.168698035917171 (code B ref 63861); Sat, 17 Jun 2023 05:40:01 +0000 Original-Received: (at 63861) by debbugs.gnu.org; 17 Jun 2023 05:39:19 +0000 Original-Received: from localhost ([127.0.0.1]:50712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAOed-0004St-7U for submit@debbugs.gnu.org; Sat, 17 Jun 2023 01:39:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAOea-0004SZ-1N for 63861@debbugs.gnu.org; Sat, 17 Jun 2023 01:39:17 -0400 Original-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 ) id 1qAOeT-0006ti-Sq; Sat, 17 Jun 2023 01:39:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=opKcxFRbwBOuYQ2ieKqDo8MqAzlo4x2W+PltHHbxL5w=; b=oaxTXNrQRjpSaIP76Os+ HcJ5J4gVijltqp4ISX6orJLGcEp2US6AQz1lDX9Zxowu38WUYWrW5XkwUqT5UTPLwQ/9XpO2UyB2M VCFb5ycTrCiSwKC+Z9EHttnr7T6rznGT4rpgP/u9K2dcG3UV87ECsHrmo8+OMcSVb/9cgcYbo4DuB 0YHRMxrgCxJMvUFcSy0x6nrnXuRLf/sySsYioeqbKsjVIm6GL4d8i+E3PN4qsrDcXlxGt06u+1vHs 22CWOPfWrB8cyN5apWWcJU++tyS0YB2A8AIzdFdLXf5p96yET9461WyniNQ4aJTVz1LE2GQBW5ujp wpJgP5FtKc2DAg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAOeS-0006hg-WA; Sat, 17 Jun 2023 01:39:09 -0400 In-Reply-To: (message from Stefan Monnier on Fri, 16 Jun 2023 14:26:54 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263501 Archived-At: > From: Stefan Monnier > Cc: 63861@debbugs.gnu.org > Date: Fri, 16 Jun 2023 14:26:54 -0400 > > +(defun pp-28 (beg &optional end) ;FIXME: Better name? > + "Prettify the current region with printed representation of a Lisp object. > +Uses the pretty-printing algorithm that was standard in Emacs≤29. ^^^^^^^^ Please avoid non-ASCII characters in doc strings: they could produce display problems on less-than-capable terminals. > +@defun pp object-or-beg &optional stream-or-end > +This function indents and fills the printed representation of an > +object (typically representing ELisp code) to make it more readable > +for humans. > + > +It accepts two calling conventions: if called with two integers > +@var{beg} and @var{end}, it indents and fills the corresponding > +region, presumably containing the printed representation of one or > +more objects, otherwise it takes a @var{object} and an optional > +@var{stream}, and prints @var{object} like @code{prin1}, but does it > +in a prettier way. This text references arguments like @var{object} that are named differently in the @defun line.