all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 18764@debbugs.gnu.org
Subject: bug#18764: 24.4; electric-indent in *scratch* signals an error
Date: Thu, 14 Jun 2018 22:34:35 -0400	[thread overview]
Message-ID: <8736xowzes.fsf@gmail.com> (raw)
In-Reply-To: <83a94te85b.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 Oct 2014 17:59:12 +0300")

tags 18764 + confirmed
found 18764 26.1
quit

Eli Zaretskii <eliz@gnu.org> writes:

> In "emacs -Q":
>
> 1) Insert the following long sequence of left parens followed by a somewhat
> shorter sequence of right parens:

Specifically, the sequence of left parens must be more than 100, to hit
this limit:

static void
scan_sexps_forward(...)
{...
  struct level levelstart[100];
  struct level *curlevel = levelstart;
  struct level *endlevel = levelstart + 100;
  ...
        case Sopen:
          ...
          if (++curlevel == endlevel)
            curlevel--; /* error ("Nesting too deep for parser"); */

and a sequence of 100 close parens so that the curlevel stack will be
completely popped:

        case Sclose:
          ...
          if (curlevel != levelstart)
            curlevel--;

In this case parse-partial-sexp will have the right depth, but
incorrectly have nil for element 2 "character address of start of last
complete sexp terminated."

Not sure exactly what to do about this though.  Maybe parse-partial-sexp
should (optionally?) signal an error when the curlevel stack overflows?






  reply	other threads:[~2018-06-15  2:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-18 14:59 bug#18764: 24.4; electric-indent in *scratch* signals an error Eli Zaretskii
2018-06-15  2:34 ` Noam Postavsky [this message]
2018-06-16 11:30   ` Eli Zaretskii
2018-06-16 13:48     ` Noam Postavsky
2018-06-16 15:03       ` Eli Zaretskii
2018-06-16 23:13         ` Noam Postavsky
2018-06-17  3:48           ` Eli Zaretskii
2018-06-18  9:33             ` Dmitry Gutov
2018-06-18 15:15               ` Eli Zaretskii
2018-06-21  0:19                 ` Noam Postavsky
2018-06-21 14:39                   ` Eli Zaretskii
2018-06-24  1:40                     ` Noam Postavsky
2018-06-24 14:52                       ` Eli Zaretskii
2018-06-25 23:20                         ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736xowzes.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=18764@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.