From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tony Finch Newsgroups: gmane.emacs.bugs Subject: bug#22112: 24.5; lockup in shell-script-mode with missing newline at eof Date: Mon, 7 Dec 2015 23:13:14 +0000 Message-ID: <337CED0A-94AD-4A1E-9797-F23C99D260E1@dotat.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1449533665 5069 80.91.229.3 (8 Dec 2015 00:14:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Dec 2015 00:14:25 +0000 (UTC) To: 22112@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 08 01:14:13 2015 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 1a65v1-0000Xc-4d for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Dec 2015 01:14:11 +0100 Original-Received: from localhost ([::1]:57109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a65v0-0002me-9B for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Dec 2015 19:14:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a65uw-0002mI-3b for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2015 19:14:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a65us-0006m7-Ro for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2015 19:14:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a65us-0006m3-Oq for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2015 19:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a65us-0002Vr-5E for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2015 19:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tony Finch Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 00:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22112 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.14495336079607 (code B ref -1); Tue, 08 Dec 2015 00:14:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Dec 2015 00:13:27 +0000 Original-Received: from localhost ([127.0.0.1]:42155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a65uH-0002Um-MF for submit@debbugs.gnu.org; Mon, 07 Dec 2015 19:13:26 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39275) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a64y9-00014n-Ur for submit@debbugs.gnu.org; Mon, 07 Dec 2015 18:13:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a64y8-0001mU-OS for submit@debbugs.gnu.org; Mon, 07 Dec 2015 18:13:21 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a64y8-0001mQ-Kx for submit@debbugs.gnu.org; Mon, 07 Dec 2015 18:13:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a64y7-0004SB-Ia for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2015 18:13:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a64y4-0001lY-SX for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2015 18:13:19 -0500 Original-Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]:35996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a64y4-0001lH-NH for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2015 18:13:16 -0500 X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from 245.30.147.195.pool.dsl.daisyplc.net ([195.147.30.245]:51375 helo=[192.168.1.123]) by ppsw-50.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.158]:587) with esmtpsa (PLAIN:fanf2) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1a64y3-0008Sy-qq (Exim 4.86_36-e07b163) for bug-gnu-emacs@gnu.org (return-path ); Mon, 07 Dec 2015 23:13:15 +0000 X-Mailer: Apple Mail (2.3112) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Mon, 07 Dec 2015 19:13:24 -0500 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: 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109738 Archived-At: In an empty shell-script buffer, I type i f left This causes emacs to lock up, consuming CPU in a tight loop without responding to the user interface. The problem occurs when there is an "if" statement on the last line of the buffer, and the buffer does not end in a newline. The "if" does not have to be right at the end of the buffer - there can be a conditional command. Movement or editing attempts around this line usually cause a lockup. Standard rubric follows... In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org Windowing system distributor `Apple', version 10.3.1404 Configured using: `configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp'' Important settings: locale-coding-system: utf-8-unix Major mode: Shell-script Minor modes in effect: sh-electric-here-document-mode: t show-paren-mode: t global-whitespace-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-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 size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Wrote /Users/fanf/.emacs Mark set Mark activated [2 times] t.sh has auto save data; consider M-x recover-this-file Setting up indent for shell type sh Indentation variables are now local. Indentation setup for shell type sh Quit Buffer *unsent mail to bug-gnu-emacs@gnu.org* modified; kill anyway? (y = or n) y Making completion list... Load-path shadows: None found. Features: (sh-script smie executable mule-util vc-git jka-compr find-func help-mode pp shadow sort gnus-util mail-extr emacsbug message 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 mail-prsvr mail-utils fanf-theme go-mode-autoloads lua-mode derived advice help-fns edmacro kmacro cl-macs compile rx comint ansi-color ring cl gv cl-loaddefs cl-lib paren whitespace cus-start cus-load time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win 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 cocoa ns multi-tty emacs) Memory information: ((conses 16 111756 13871) (symbols 48 20921 0) (miscs 40 138 265) (strings 32 20354 3268) (string-bytes 1 560447) (vectors 16 13116) (vector-slots 8 422660 7712) (floats 8 65 365) (intervals 56 877 210) (buffers 960 20))