GNU bug report logs - #67820
29.1; Code example in "fwd-para while" has unmatched ending parentheses

Previous Next

Package: emacs;

Reported by: Xiyue Deng <manphiz <at> gmail.com>

Date: Thu, 14 Dec 2023 05:57:02 UTC

Severity: normal

Tags: patch

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Xiyue Deng <manphiz <at> gmail.com>
Cc: 67820 <at> debbugs.gnu.org
Subject: bug#67820: 29.1; Code example in "fwd-para while" has unmatched ending parentheses
Date: Sat, 16 Dec 2023 09:52:40 +0200
> From: Xiyue Deng <manphiz <at> gmail.com>
> Cc: 67820 <at> debbugs.gnu.org
> Date: Fri, 15 Dec 2023 14:08:51 -0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Xiyue Deng <manphiz <at> gmail.com>
> >> Date: Wed, 13 Dec 2023 21:55:55 -0800
> >> 
> >> 
> >> The code example in section "fwd-para while" has unmatched ending
> >> parentheses[1].  Admittedly this code snippet was copied literally from
> >> the previous longer code sample where the 2 extra ending parentheses
> >> were to match the `if' and `while', but it would make more sense to drop
> >> them in this example.  Will add a patch next.
> >
> > I'm not sure it makes sense to make this expression stand-alone.  As
> > you say, this snippet is copied verbatim from the full example at the
> > beginning of the section.  So I think we should leave this alone.
> >
> > Thanks.
> 
> This essentially was due to the coding convention to put all ending
> parentheses on the last line of the sexp, which most other programming
> languages don't normally share.  But anyway.
> 
> Just want to say that a code snippet with unmatched ending parentheses
> would confuse beginners a little.  However, if from a book writing point
> of view that code snippets should be copied literally, it's probably
> understandable (adding a small explanation for the extras would better
> still, and I can update the patch accordingly.)
> 
> Wdyt?

It's okay to add a note in parentheses that this snippet is from the
above full code, and therefore is not standalone.




This bug report was last modified 1 year and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.