From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Kelling Newsgroups: gmane.emacs.bugs Subject: bug#18029: 24.4.50; bad shell-script-mode indentation due to ^[{([] in a here document Date: Tue, 15 Jul 2014 15:20:29 -0700 Message-ID: <87ha2i2riq.fsf@treetowl.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1405462886 28720 80.91.229.3 (15 Jul 2014 22:21:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jul 2014 22:21:26 +0000 (UTC) To: 18029@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 16 00:21:19 2014 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 1X7B65-0004mF-FE for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Jul 2014 00:21:17 +0200 Original-Received: from localhost ([::1]:36867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7B65-0000wt-0B for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Jul 2014 18:21:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7B5w-0000vr-Hb for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 18:21:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7B5q-00056P-RN for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 18:21:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7B5q-00056L-NT for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 18:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X7B5q-0007qu-DY for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 18:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ian Kelling Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Jul 2014 22:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18029 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.140546285830161 (code B ref -1); Tue, 15 Jul 2014 22:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Jul 2014 22:20:58 +0000 Original-Received: from localhost ([127.0.0.1]:55895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X7B5m-0007qO-0f for submit@debbugs.gnu.org; Tue, 15 Jul 2014 18:20:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55704) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X7B5i-0007q8-S2 for submit@debbugs.gnu.org; Tue, 15 Jul 2014 18:20:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7B5X-00051P-MG for submit@debbugs.gnu.org; Tue, 15 Jul 2014 18:20:49 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7B5X-00051L-IU for submit@debbugs.gnu.org; Tue, 15 Jul 2014 18:20:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7B5S-0000rV-7U for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 18:20:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7B5M-0004wv-FA for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 18:20:38 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:59098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7B5M-0004wd-9F for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 18:20:32 -0400 Original-Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 9DD4421E0B; Tue, 15 Jul 2014 18:20:30 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Tue, 15 Jul 2014 18:20:30 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= from:to:subject:date:message-id:mime-version:content-type; s= mesmtp; bh=7PXSCENoVBQE2/ezZbQiK8n7afk=; b=kUq1q8skH7K3LDUwAXAbE m8J+2AbhZwzPDZQKoSM0RjaiCExVko2JXoSE+6DaU6LOsjHguBhNJTcqZXPejw4X zO46QLcZYXmyH7f3m9xrccRCfROzn/tCWVQqeMQU5s9U9f7qEVFGbFn8eQ3SPK6G UsOnzqb+SwonUOEt9gXHWI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :mime-version:content-type; s=smtpout; bh=7PXSCENoVBQE2/ezZbQiK8 n7afk=; b=tKDYWBzIDgbnj2NoCFo4iP4CVVoFUlISG6Uid0ZPIUJRMgc17icL7Z wktt9qSMtVTd7SrSsMLDoijV3FTagclXVPCzlYdMRbMN2z/kGFMB8IPvTd8ZXiWs a8CmSGAgHXuQDAjCyfoSMZ9a8+B3bgdiEYA8c8YiHB4vFmzDDaBL0= X-Sasl-enc: GzbZ+psm4Z3rvIPImOW3ycV0jFqnqhjQs5fPi6EmdEiv 1405462830 Original-Received: from treetowl.localdomain (unknown [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 61AF06800F0 for ; Tue, 15 Jul 2014 18:20:30 -0400 (EDT) Original-Received: by treetowl.localdomain (Postfix, from userid 1000) id 8BE057F090; Tue, 15 Jul 2014 15:20:29 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91578 Archived-At: emacs -Q the following files, then use indent region on the whole buffer: (indent-region (point-min) (point-max)) Similar indent commands will work the same. This is how they get indented: #!/bin/bash if true; then true <<'EOF' [ line beginning with one of [{( EOF fi if true; then true # comment containing a single quote 'true fi true The true commands could be other things, they are just an example. I assume the if statements could be other things which create indents. The final fi and anything beyond it get bad indenting that is determined by the quote in the first quote from 'EOF' Another variation of this bug: #!/bin/bash if true; then true < Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. r has auto save data; consider M-x recover-this-file Setting up indent for shell type bash Indentation variables are now local. Indentation setup for shell type bash Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message dired format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils sh-script smie executable time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 83313 7281) (symbols 48 18389 0) (miscs 40 39 124) (strings 32 12921 4377) (string-bytes 1 335173) (vectors 16 10129) (vector-slots 8 404842 13811) (floats 8 68 68) (intervals 56 193 1) (buffers 960 12) (heap 1024 35157 980))