From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#4920: 23.1; (check-parens) problem with bash script case items unbalanced close paren Date: Thu, 07 Jul 2016 21:10:54 -0400 Message-ID: <8737nlc4td.fsf@users.sourceforge.net> References: <87hbsxgjfe.fsf@stupidchicken.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467940292 26959 80.91.229.3 (8 Jul 2016 01:11:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2016 01:11:32 +0000 (UTC) Cc: 4920@debbugs.gnu.org, Chong Yidong , Jeremy Hall To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 08 03:11:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bLKK2-0004tR-AP for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 03:11:14 +0200 Original-Received: from localhost ([::1]:42970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLKK1-0002yk-Bd for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jul 2016 21:11:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLKJv-0002rN-7J for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 21:11:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLKJq-0005Td-6F for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 21:11:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLKJq-0005TY-2z for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 21:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bLKJp-0002qy-Pu for bug-gnu-emacs@gnu.org; Thu, 07 Jul 2016 21:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Jul 2016 01:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4920 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 4920-submit@debbugs.gnu.org id=B4920.146794025510956 (code B ref 4920); Fri, 08 Jul 2016 01:11:01 +0000 Original-Received: (at 4920) by debbugs.gnu.org; 8 Jul 2016 01:10:55 +0000 Original-Received: from localhost ([127.0.0.1]:41643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLKJj-0002qZ-Kd for submit@debbugs.gnu.org; Thu, 07 Jul 2016 21:10:55 -0400 Original-Received: from mail-io0-f193.google.com ([209.85.223.193]:35260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLKJg-0002qE-6B; Thu, 07 Jul 2016 21:10:54 -0400 Original-Received: by mail-io0-f193.google.com with SMTP id k78so4367976ioi.2; Thu, 07 Jul 2016 18:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=GlZygexKEGXPZ9oJxuAaBJ98zozO6AKWJ84iCb29amo=; b=aryLYpb7MMmM3pKVQ7nSW+4LZ6LKFzX3C2WmpTZ84ldfhmxxqxPf8SvgfDUBMgvE15 pqJtoXl+vIpsqL+uVHe0JoaZmZBolrqlm7CGxagkiESMb+17AcbmZEPlEzxNLfpDefuJ Ji1K4Iad+zIObiiZyTurX0nH7PEZdVbwU0vYhtKN5NHFqz+SSpconp9W2uHHn21WajMF yvC4pj1EWdWVpiBZKY5w5wDu6z4SRZP67VCY3dA5HWsKewTKFN0bHRlHvV1x+MJaeFHs keDOfaNHaCO5OjCgMPZi0vx7v/FczwSlPK5+qCK5CCaeRN3HF8Tg9XQIk2lIxFVkUn7P +YIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=GlZygexKEGXPZ9oJxuAaBJ98zozO6AKWJ84iCb29amo=; b=YJ5To4Tg8I+WmaeI96rdQXFkvUpQZln682kj1IGbxow1CBTQVuzvhBEcyUC7xsL6gC d6w0Hw32VEOQqZIZFhyrdhDN19S1hOdllpt4crjM7plkw7jI+hrFB8LUDx0LIaW2pGbr Ef4PvZjqZVJN+KWjSQVWqsgvu6hFiU79wd60/+WU4fCCukl/kFrn6qf475GkCu+BLcMT AehxzNZY5JnAn7gOGFZ6bxPoRlFBrnZmqq+3VG3h10WbdYH/alwaFxQ+8vW2W7KVEoHZ 77IwaXsN/nN7l01Vx26xJbr4M/0YxuB4wkWR7U5dUlJJmtj7svcezRSlnD32O6LHJa3i UMpA== X-Gm-Message-State: ALyK8tK/Gyi5Rg/WDj8YJM4vk2V8CAkURHLG3sJw0FnlqcElvuOy1PLRKs/F/g9R4AmuJg== X-Received: by 10.107.9.169 with SMTP id 41mr5874762ioj.196.1467940246689; Thu, 07 Jul 2016 18:10:46 -0700 (PDT) Original-Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id d71sm3008187ith.2.2016.07.07.18.10.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jul 2016 18:10:46 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 14 Nov 2009 13:11:10 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) 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:120610 Archived-At: tags 4920 patch quit Stefan Monnier writes: >>> Running (check-parens) fails on a bash script with case statements in >>> because of the unmatched close ")". Would it be possible to fix this, >>> or tell me how to work around it? >> I can't reproduce this: `M-x check-parens RET' on the following file >> signals no error. Please provice a more detailed bug report. > >> #!/bin/sh > >> case "$SYSNAME" in >> Darwin) >> ;; >> Linux) > > Those parentheses get a syntax-table property applied by > font-lock-syntactic-keywords, which means that the behavior will be > (hopefully) correct for the visible part of the text, and maybe for all > the text before that, but not necessarily for the text after > window-end. Right, seems to easily reproducible with echo '#!/bin/sh' > bug-4920-check-parens.sh seq -f '# etc %.0f' 1000 >> bug-4920-check-parens.sh cat >>bug-4920-check-parens.sh <