From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Phil Newsgroups: gmane.emacs.bugs Subject: bug#24337: 25.1; Indentation regression for 'if' in shell-script mode Date: Tue, 30 Aug 2016 11:02:30 +0200 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1472547807 15863 195.159.176.226 (30 Aug 2016 09:03:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Aug 2016 09:03:27 +0000 (UTC) To: 24337@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 30 11:03:21 2016 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 1beeww-0003Or-2Z for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Aug 2016 11:03:18 +0200 Original-Received: from localhost ([::1]:47875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beewx-0001nu-0G for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Aug 2016 05:03:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beewn-0001VI-AR for bug-gnu-emacs@gnu.org; Tue, 30 Aug 2016 05:03:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beewh-0003db-2k for bug-gnu-emacs@gnu.org; Tue, 30 Aug 2016 05:03:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beewg-0003dX-VB for bug-gnu-emacs@gnu.org; Tue, 30 Aug 2016 05:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1beewg-0003hT-Jv for bug-gnu-emacs@gnu.org; Tue, 30 Aug 2016 05:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Aug 2016 09:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24337 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147254778014213 (code B ref -1); Tue, 30 Aug 2016 09:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Aug 2016 09:03:00 +0000 Original-Received: from localhost ([127.0.0.1]:44042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beewd-0003hA-O4 for submit@debbugs.gnu.org; Tue, 30 Aug 2016 05:03:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37903) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beewc-0003gx-47 for submit@debbugs.gnu.org; Tue, 30 Aug 2016 05:02:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beewR-0003bd-3O for submit@debbugs.gnu.org; Tue, 30 Aug 2016 05:02:52 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beewQ-0003bZ-W9 for submit@debbugs.gnu.org; Tue, 30 Aug 2016 05:02:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beewO-00012x-Ei for bug-gnu-emacs@gnu.org; Tue, 30 Aug 2016 05:02:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beewJ-0003a9-0C for bug-gnu-emacs@gnu.org; Tue, 30 Aug 2016 05:02:43 -0400 Original-Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:36904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beewI-0003a1-PQ for bug-gnu-emacs@gnu.org; Tue, 30 Aug 2016 05:02:38 -0400 Original-Received: by mail-wm0-x235.google.com with SMTP id i5so24048953wmg.0 for ; Tue, 30 Aug 2016 02:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=4SHcAvxzKmL6PwefBCVoHtftrrIyR7CdgptWS31QdxA=; b=RirQ6vwF1C2DuFMFpyx1V3C/QU7PRE9z8WnscSBduDw8kshM7O/roaalzUxw8oK4hS ndNvDHHYEo/uNJ0ky4BTrAkvXb3xlGh/zGtZ+0OEB3BbptTDzC9tmoGB/qn8KjmCCedJ s2aVg47RlNigU0HXrzWBeV5mcuAOPw/6Yq7sgKk9Q9Snpn5/gqseWaJwXNIPe0Xuwz5d Usj/WuRYda/LkdgHi+0jbaH5kQjrfg3EoQ3lPEnQIgjs9+KXdY3k5WzLk5J5/5+4W2gc 6drCgaheKCcchWtBuBfZZQRvKrHS0qy0awvNhh7NKVsti7Z2p3O+ZCh1V1v/pzdoNSoT LkFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=4SHcAvxzKmL6PwefBCVoHtftrrIyR7CdgptWS31QdxA=; b=mHUY9q0CW/p+KcSiq70J9+hgjf1tfbRBGgkCH18MRq6TegBq05Ad0vAvHh+ZawXwrs Vrwxip3NIpLTYgHTpXkJ17ebu8z/eI420cvcoPiYOloMzwNmJGqj5xLg5MHKlFBUmelQ DIwRq9EMABW0LoqEqnz6rM8GILWd6kJW8l4UZx3Un3WsGRz0DGtyesOjx7D9VaL6mL1e 7q2fde0LTDT2cD3JJkWRA6XcUs8I23e/oGlgJp6SabY5L5W5hGV50wLMOnu6xnTr7RcF AyV1SVNTqF/wkgL+0sWHwvKewD5RckptxbkXj40p5NUwhDpyKc3VbH457n1mqL1NGeEC 1+Fw== X-Gm-Message-State: AE9vXwMJ4aA9ByMHCJYPKWx5huOPIDSQS9yjaLtDaEJiaZ+fdO6t3kmwys9RUJ9QLoaFcw== X-Received: by 10.194.175.38 with SMTP id bx6mr2098996wjc.47.1472547757287; Tue, 30 Aug 2016 02:02:37 -0700 (PDT) Original-Received: from phst-glaptop2 ([2001:4c50:32f:d100:d816:c6fe:2360:ad03]) by smtp.gmail.com with ESMTPSA id r16sm17574194wme.16.2016.08.30.02.02.35 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 30 Aug 2016 02:02:36 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:122766 Archived-At: Create a file /tmp/foo.sh with the following contents: #!/bin/bash if true; then xxx fi while true; do yyy done # Local Variables: # sh-basic-offset: 2 # End: Then, start Emacs with 'emacs -Q' and visit that file. Reindent the entire file (C-x h TAB). Expected behavior: The statements 'xxx' and 'yyy' remain indented by 2 spaces (the basic indent offset set in the file-local variable). Actual behavior: 'yyy' remains at 2 spaces, 'xxx' incorrectly gets 4 spaces of indentation. This is a regression from previous Emacs versions (e.g. Emacs 24.3). In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2016-08-30 built on unknown Repository revision: 17197d0ae9eac100b56078b2a48964b29710b76e Windowing system distributor 'The X.Org Foundation', version 11.0.11702000 System Description: Ubuntu 14.04 LTS Configured features: XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: en_US.UTF-8 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. Quit Setting up indent for shell type bash Indentation variables are now local. Indentation setup for shell type bash Mark set [2 times] Indenting region...done Saving file /tmp/foo.sh... Wrote /tmp/foo.sh 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 apropos time-date mule-util 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 inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 95145 5677) (symbols 48 20205 0) (miscs 40 345 131) (strings 32 17143 4898) (string-bytes 1 485673) (vectors 16 12839) (vector-slots 8 454828 3870) (floats 8 162 172) (intervals 56 268 0) (buffers 976 22) (heap 1024 30747 1134))