GNU bug report logs - #27802
25.2; sh-mode wrongly mismatched ()

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: scinart <akubeej@HIDDEN>; Keywords: confirmed; dated Mon, 24 Jul 2017 09:11:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) confirmed. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug Marked as found in versions 28.0.50. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Jul 2017 09:10:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 24 05:10:39 2017
Received: from localhost ([127.0.0.1]:53831 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dZZNu-0000VX-Ng
	for submit <at> debbugs.gnu.org; Mon, 24 Jul 2017 05:10:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42917)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <akubeej@HIDDEN>) id 1dZZNs-0000VI-Gh
 for submit <at> debbugs.gnu.org; Mon, 24 Jul 2017 05:10:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <akubeej@HIDDEN>) id 1dZZNl-0007Sn-Qn
 for submit <at> debbugs.gnu.org; Mon, 24 Jul 2017 05:10:30 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:39370)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <akubeej@HIDDEN>) id 1dZZNl-0007Sj-N7
 for submit <at> debbugs.gnu.org; Mon, 24 Jul 2017 05:10:29 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33887)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <akubeej@HIDDEN>) id 1dZZNk-0002fg-Et
 for bug-gnu-emacs@HIDDEN; Mon, 24 Jul 2017 05:10:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <akubeej@HIDDEN>) id 1dZZNh-0007PZ-6t
 for bug-gnu-emacs@HIDDEN; Mon, 24 Jul 2017 05:10:28 -0400
Received: from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234]:38270)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <akubeej@HIDDEN>) id 1dZZNh-0007PG-0X
 for bug-gnu-emacs@HIDDEN; Mon, 24 Jul 2017 05:10:25 -0400
Received: by mail-pg0-x234.google.com with SMTP id s4so54571705pgr.5
 for <bug-gnu-emacs@HIDDEN>; Mon, 24 Jul 2017 02:10:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:mime-version;
 bh=jJIbLVucOhU6CO6xUpA9jkMN1YnsK9yusN6KdJM2fpc=;
 b=u5Hnyb7Fc1NEGeR2S73wYlVQ5w6qXUsDMbsnzOSZFG3GmchpvtSLzYO3OCoq93+DTS
 oq3BUYBxA+dbnyqyW0b+C5Sgi4I+UhuoJqEHGkx6mYMEXTkKiCfehUEQSbvCQPlHqJMp
 SbgmzKA25BqqDKSXQ4CVu/SMNkP1hl0FOF/v3N3djJ1tLlQBilv1WV/tFHXcD/Cu/BCP
 DjIPXc9rz8j9kIEYGdGb+FaHalZWlOGtNnXVjgO7PdOs4VisCdswaa29gunvhuaEGxgf
 UR0N3GwDiLpcoGQuZipHcSumowSlf5mdcuBxvJR8NoNNu+tBQ8uLlndYUhJH7Qbzd0RZ
 4Q5w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=jJIbLVucOhU6CO6xUpA9jkMN1YnsK9yusN6KdJM2fpc=;
 b=b/am4A4vkR4LD8da60F76k3VF+dgk0g0AKsuWnlxfaKXRNZFYHSdt0ti5AeEJs/L1i
 aDPctGjtCE3dZcOM8+63Rv+GGM6F9ohM1EGhN1CNS2VVGPFA5zhjIuP5O+MJ0nM3Xy0b
 81tOKB1kRanhmAqC9P12rM4QrIirOoSVGZT4rsG4yTz+sRmGrlWOdZUy9pClDZOD1KaE
 lt6Q0yfc7tXxk6ZrHi+Y+2FrfIWcPFETudHutDiUnwxYG69+bu3iu7xL4y1nxMZzn7cE
 HHfv0lcOx0sbPKqqJ8iNcVxw9N8iucS0VgkHwoTn2RHPZaW16UXthgEFx3t6ia8RH7qv
 /OFw==
X-Gm-Message-State: AIVw112/owyy90ptMhY4mrGnw6yfT0JD1puDgqLqAdciKF+PJmSMeBz3
 gwRSHXj7PHHwdCNI
X-Received: by 10.99.96.74 with SMTP id u71mr15234343pgb.129.1500887422228;
 Mon, 24 Jul 2017 02:10:22 -0700 (PDT)
Received: from Cool ([218.189.127.74])
 by smtp.gmail.com with ESMTPSA id x23sm20802684pfk.102.2017.07.24.02.10.20
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 24 Jul 2017 02:10:20 -0700 (PDT)
From: scinart <akubeej@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.2; sh-mode wrongly mismatched ()
Date: Mon, 24 Jul 2017 17:08:37 +0800
Message-ID: <87tw22i4mi.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -6.8 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.8 (------)


emacs -Q a.sh which contains the following line

for ((;;)); do
    echo 123
    break;
done

then mark all buffer and M-x indent-region; the buffer is wrongly
indented due to the fact that '()' are not correctly paired.



In GNU Emacs 25.2.1 (x86_64-suse-linux-gnu, GTK+ Version 3.22.15)
 of 2017-06-17 built on cloud111
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description:	openSUSE Tumbleweed

Configured using:
 'configure --with-pop --without-hesiod --with-kerberos --with-kerberos5
 --with-xim --with-wide-int --with-file-notification=inotify
 --with-modules --enable-autodepend --prefix=/usr
 --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
 --localstatedir=/var --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --enable-locallisppath=/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-x --with-sound --with-xpm --with-jpeg --with-tiff --with-gif
 --with-png --with-rsvg --with-dbus --with-xft --without-gpm
 --with-x-toolkit=gtk3 --with-xwidgets --with-toolkit-scroll-bars
 --x-includes=/usr/include --x-libraries=/usr/lib64 --with-libotf
 --with-m17n-flt --build=x86_64-suse-linux 'CFLAGS=-fmessage-length=0
 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2
 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables
 -g -D_GNU_SOURCE -DGDK_DISABLE_DEPRECATION_WARNINGS
 -DGLIB_DISABLE_DEPRECATION_WARNINGS -pipe -Wno-pointer-sign
 -Wno-unused-variable -Wno-unused-label -Wno-unprototyped-calls
 -fno-optimize-sibling-calls -fno-PIE -DSYSTEM_PURESIZE_EXTRA=55000
 -DSITELOAD_PURESIZE_EXTRA=10000 ' LDFLAGS=-Wl,-O2'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES XWIDGETS

Important settings:
  value of $LC_NUMERIC: POSIX
  value of $LC_TIME: C
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: Shell-script

Minor modes in effect:
  sh-electric-here-document-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Setting up indent for shell type sh
Indentation variables are now local.
Indentation setup for shell type sh
Mark set [2 times]
Indenting region...done
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils sh-script smie executable
time-date mule-util delsel lpr tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify
dynamic-setting system-font-setting font-render-setting xwidget-internal
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 96308 7535)
 (symbols 48 20530 0)
 (miscs 40 54 171)
 (strings 32 17043 4440)
 (string-bytes 1 465198)
 (vectors 16 13232)
 (vector-slots 8 458197 4167)
 (floats 8 169 67)
 (intervals 56 336 0)
 (buffers 976 20))




Acknowledgement sent to scinart <akubeej@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#27802; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 10 Aug 2020 17:00:02 UTC

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