From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Montsaroff Newsgroups: gmane.emacs.bugs Subject: bug#61192: Emacs 28.1: Bash Shell Script Indenting does not recognize if, [....]; then Date: Mon, 30 Jan 2023 14:14:32 -0800 Message-ID: <2cd38f68-a14c-6937-1356-c86be3232a0b@pobox.com> Reply-To: stephm@pobox.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------ioTFPhfP2ZudkbWhCokbnqjE" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22203"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 To: 61192@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 31 06:37:33 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMjKn-0005bJ-Ml for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Jan 2023 06:37:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMjKK-0004Hj-Jx; Tue, 31 Jan 2023 00:37:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMjKI-0004Fb-QD for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 00:37:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMjKI-0007x8-II for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 00:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pMjKI-0003Rk-De for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 00:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Montsaroff Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Jan 2023 05:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61192 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167514338113160 (code B ref -1); Tue, 31 Jan 2023 05:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Jan 2023 05:36:21 +0000 Original-Received: from localhost ([127.0.0.1]:51136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMjJd-0003QA-2t for submit@debbugs.gnu.org; Tue, 31 Jan 2023 00:36:21 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:37440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMcQA-0000LZ-7Y for submit@debbugs.gnu.org; Mon, 30 Jan 2023 17:14:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMcQA-0004JS-0y for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2023 17:14:38 -0500 Original-Received: from pb-smtp1.pobox.com ([64.147.108.70]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMcQ7-0002O2-Sj for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2023 17:14:37 -0500 Original-Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id E48DB182696 for ; Mon, 30 Jan 2023 17:14:34 -0500 (EST) (envelope-from stephm@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h= content-type:message-id:date:mime-version:reply-to:from:to :subject; s=sasl; bh=TgUyTEZlgTx49iUSqg9ahFlmhUcPNK+wwkLV7m35uEs =; b=lnenNOajaRTDGabQHqoc8/PDYmdsGsLXrh/azdZ5sbMIRe6PQmP9O7cZsSf kwMSKEm+OwsqBCwrZBdt0YqDZeHfMgD/8V3YwniY9cb48p0cGOa2QbO+V6Qv5sOj SJSTUTgMThSkN50qeP6ZkbGlhZ5DQo2fYlfyHjkI594xTrIw= Original-Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id DBD6E182695 for ; Mon, 30 Jan 2023 17:14:34 -0500 (EST) (envelope-from stephm@pobox.com) Original-Received: from [161.55.244.76] (unknown [161.55.244.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 357F8182694 for ; Mon, 30 Jan 2023 17:14:34 -0500 (EST) (envelope-from stephm@pobox.com) Content-Language: en-US X-Pobox-Relay-ID: 7A037CF8-A0EB-11ED-A82D-2AEEC5D8090B-43920898!pb-smtp1.pobox.com Received-SPF: pass client-ip=64.147.108.70; envelope-from=stephm@pobox.com; helo=pb-smtp1.pobox.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 31 Jan 2023 00:36:19 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254502 Archived-At: This is a multi-part message in MIME format. --------------ioTFPhfP2ZudkbWhCokbnqjE Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Since upgrade to Emacs 28.1, I have noted an annoy change in shell-script mode auto-formatting. I would like to recover the old behavior Before, if I entered if [ "$x" =3D "" ];then =C2=A0=C2=A0=C2=A0 export x=3D$y fi and then enter new line, the new line would align with the fi if [ "$x" =3D "" ];then =C2=A0=C2=A0=C2=A0 export x=3D$y fi cp fred ethel Now it I do the same thing I get the new line indented if [ "$x" =3D "" ];then =C2=A0=C2=A0=C2=A0 export x=3D$y fi =C2=A0=C2=A0=C2=A0 cp fred ethel The matching code also does not recognize that the fi is connected to the then statement. This is not the case if I break the if into two lines or add a leading space to the ; if [ "$x" =3D "" ] then =C2=A0=C2=A0=C2=A0 export x=3D$y fi cp fred ethel if [ "$x" =3D "" ];then =C2=A0=C2=A0=C2=A0 export x=3D$y fi cp fred ethel In GNU Emacs 28.1 (build 2, x86_64-w64-mingw32) =C2=A0of 2022-04-21 built on AVALON Windowing system distributor 'Microsoft Corp.', version 10.0.19045 System Description: Microsoft Windows 10 Enterprise (v10.0.2009.19045.213= 0) Configured using: =C2=A0'configure --with-modules --without-dbus --with-native-compilation =C2=A0--without-compress-install CFLAGS=3D-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM ZLIB (NATIVE_COMP present but libgccjit not available) Important settings: =C2=A0 value of $LC_CTYPE: en_US.UTF-8 =C2=A0 value of $LANG: ENU =C2=A0 locale-coding-system: cp1252 Major mode: Lisp Interaction Minor modes in effect: =C2=A0 tooltip-mode: t =C2=A0 global-eldoc-mode: t =C2=A0 eldoc-mode: t =C2=A0 show-paren-mode: t =C2=A0 electric-indent-mode: t =C2=A0 mouse-wheel-mode: t =C2=A0 tool-bar-mode: t =C2=A0 menu-bar-mode: t =C2=A0 file-name-shadow-mode: t =C2=A0 global-font-lock-mode: t =C2=A0 font-lock-mode: t =C2=A0 blink-cursor-mode: t =C2=A0 auto-composition-mode: t =C2=A0 auto-encryption-mode: t =C2=A0 auto-compression-mode: t =C2=A0 line-number-mode: t =C2=A0 indent-tabs-mode: t =C2=A0 transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer 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 composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 60127 6905) =C2=A0(symbols 48 7062 1) =C2=A0(strings 32 21734 2167) =C2=A0(string-bytes 1 718164) =C2=A0(vectors 16 14999) =C2=A0(vector-slots 8 258735 12590) =C2=A0(floats 8 23 303) =C2=A0(intervals 56 228 0) =C2=A0(buffers 992 10)) --------------ioTFPhfP2ZudkbWhCokbnqjE Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Since upgrade to Emacs 28.1, I have noted an annoy change in
shell-script mode auto-formatting.

I would like to recover the old behavior

Before, if I entered

if [ "$x" =3D "" ];then
=C2=A0=C2=A0=C2=A0 export x=3D$y
fi

and then enter new line, the new line would align with the fi

if [ "$x" =3D "" ];then
=C2=A0=C2=A0=C2=A0 export x=3D$y
fi
cp fred ethel

Now it I do the same thing I get the new line indented

if [ "$x" =3D "" ];then
=C2=A0=C2=A0=C2=A0 export x=3D$y
fi
=C2=A0=C2=A0=C2=A0 cp fred ethel

The matching code also does not recognize that the
fi is connected to the then statement.

This is not the case if I break the if into two lines or add a leading
space to the ;

if [ "$x" =3D "" ]
then
=C2=A0=C2=A0=C2=A0 export x=3D$y
fi
cp fred ethel

if [ "$x" =3D "" ];then
=C2=A0=C2=A0=C2=A0 export x=3D$y
fi
cp fred ethel





In GNU Emacs 28.1 (build 2, x86_64-w64-mingw32)
=C2=A0of 2022-04-21 built on AVALON
Windowing system distributor 'Microsoft Corp.', version 10.0.19045 System Description: Microsoft Windows 10 Enterprise (v10.0.2009.19045.2130)

Configured using:
=C2=A0'configure --with-modules --without-dbus --with-native-compilat= ion
=C2=A0--without-compress-install CFLAGS=3D-O2'

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
XPM ZLIB

(NATIVE_COMP present but libgccjit not available)

Important settings:
=C2=A0 value of $LC_CTYPE: en_US.UTF-8
=C2=A0 value of $LANG: ENU
=C2=A0 locale-coding-system: cp1252

Major mode: Lisp Interaction

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search seq byte-opt
gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs
cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table
term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang<= br> misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties<= br> overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 60127 6905)
=C2=A0(symbols 48 7062 1)
=C2=A0(strings 32 21734 2167)
=C2=A0(string-bytes 1 718164)
=C2=A0(vectors 16 14999)
=C2=A0(vector-slots 8 258735 12590)
=C2=A0(floats 8 23 303)
=C2=A0(intervals 56 228 0)
=C2=A0(buffers 992 10))

--------------ioTFPhfP2ZudkbWhCokbnqjE--