From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#18764: 24.4; electric-indent in *scratch* signals an error Date: Thu, 14 Jun 2018 22:34:35 -0400 Message-ID: <8736xowzes.fsf@gmail.com> References: <83a94te85b.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1529029994 17258 195.159.176.226 (15 Jun 2018 02:33:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 15 Jun 2018 02:33:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 18764@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 15 04:33:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTeY0-0004Np-RC for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Jun 2018 04:33:08 +0200 Original-Received: from localhost ([::1]:43942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTea8-000878-2w for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Jun 2018 22:35:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTeZt-000852-HK for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2018 22:35:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTeZq-0008Fm-Co for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2018 22:35:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40839) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTeZq-0008FR-8x for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2018 22:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fTeZp-0000jk-QN for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2018 22:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Jun 2018 02:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18764 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18764-submit@debbugs.gnu.org id=B18764.15290300842805 (code B ref 18764); Fri, 15 Jun 2018 02:35:01 +0000 Original-Received: (at 18764) by debbugs.gnu.org; 15 Jun 2018 02:34:44 +0000 Original-Received: from localhost ([127.0.0.1]:48736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTeZY-0000j9-Ah for submit@debbugs.gnu.org; Thu, 14 Jun 2018 22:34:44 -0400 Original-Received: from mail-io0-f178.google.com ([209.85.223.178]:42383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTeZX-0000im-0I; Thu, 14 Jun 2018 22:34:43 -0400 Original-Received: by mail-io0-f178.google.com with SMTP id r24-v6so9323772ioh.9; Thu, 14 Jun 2018 19:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=IJFeI+u97lrM0kvRrJ+79uA2OjK3WrUpkaRPf3bEv+8=; b=veYtoUNUY6msnOZ2DWtDQAFGHa9TZKiRjpbIiTp0uaaVcfYA49hPfGz1+3r7v836mj BOO4FOjj1sz1YDm2cZcHcx4r4uEC1cH0ajAV1NDJbL5gfmDwC6rmu1UAiDTeo39drK5K q2XoBP7y24Eu89QqtdzXnC0sfV3NiGKMTaBR4nn1+HU/PskxI34iKhqEoo7UE7AEvv/w CwYVDcsRvimFzzcGPitOezkX6PoEUKwrBaczCVxRkpYEJgurdXpJJDuvU0vNLcrHBLRy LzZSkgYcZHIWyL+EVdVpKMTNfB/zu1KILkIRm6tyDwIqOe+iq0GpuZ9gm1t0TYGSUzFS W6AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=IJFeI+u97lrM0kvRrJ+79uA2OjK3WrUpkaRPf3bEv+8=; b=tLjGWY8yqt2/2ki5Em+SYDLESl6yiRkCllKvZ/bw27b3PIhhnJZ6htEdBNr039x0Xp r4wYCh1IyUrxn0ku0u5tfM+/N4w0Bwoa5tT9HCrn4fjobWuZelfZ9I30ftimp+8PQnF3 jqeAt0tIE7VfFwcyMyioEPbSzkyIH+ZJ583MtbxZfPi24+SApdN0dQ9FT+NLcsarZ+jO N8Xjfyr7rV8ebx0jzGk7Tu5tcWDsfBfjRDhv97QmxKCfiXPm+qXwY5qDB7E+14KcqlXQ Nawrnc0VlC3M7g6eS7shFnV7t7wItmUr6PyXDVFaQ9J7cYR83ITPKcrONPIuojGh62Ii 4Xmg== X-Gm-Message-State: APt69E244Phuz2cT7sk7U3wU6zTM88hueIuvzI0ASw14wk9Rrdk3S1RY s+sa+Jv8+KqjE2WUoL387jL0dQ== X-Google-Smtp-Source: ADUXVKLoy0dKKb+uUDbjtQpvfvI0d03luCzMVeekOgHHghljYupuPrcGgaRffYna4SkQO/E694Gfmg== X-Received: by 2002:a6b:c741:: with SMTP id x62-v6mr4326222iof.99.1529030077401; Thu, 14 Jun 2018 19:34:37 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id v200-v6sm386324ita.43.2018.06.14.19.34.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Jun 2018 19:34:36 -0700 (PDT) In-Reply-To: <83a94te85b.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 Oct 2014 17:59:12 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147441 Archived-At: tags 18764 + confirmed found 18764 26.1 quit Eli Zaretskii 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?