From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#17262: In Perl mode, TAB zaps EOF marker alignment Date: Wed, 16 Apr 2014 10:13:59 -0400 Message-ID: References: <877g6yov42.fsf@jidanni.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1397657731 13358 80.91.229.3 (16 Apr 2014 14:15:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Apr 2014 14:15:31 +0000 (UTC) Cc: 17262-done@debbugs.gnu.org To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 16 16:15:24 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 1WaQcV-0001u5-Lf for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Apr 2014 16:15:23 +0200 Original-Received: from localhost ([::1]:54788 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaQcV-0001bu-4n for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Apr 2014 10:15:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaQcK-0001OJ-Qa for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2014 10:15:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WaQcB-0000QD-RH for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2014 10:15:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaQcB-0000Q0-PB for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2014 10:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WaQcB-00042g-By for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2014 10:15:03 -0400 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Apr 2014 14:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 17262 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 17262@debbugs.gnu.org, monnier@iro.umontreal.ca, jidanni@jidanni.org Original-Received: via spool by 17262-done@debbugs.gnu.org id=D17262.139765764815428 (code D ref 17262); Wed, 16 Apr 2014 14:15:02 +0000 Original-Received: (at 17262-done) by debbugs.gnu.org; 16 Apr 2014 14:14:08 +0000 Original-Received: from localhost ([127.0.0.1]:49769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WaQbH-00040m-JK for submit@debbugs.gnu.org; Wed, 16 Apr 2014 10:14:07 -0400 Original-Received: from relais.videotron.ca ([24.201.245.36]:25705) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WaQbF-00040b-JV for 17262-done@debbugs.gnu.org; Wed, 16 Apr 2014 10:14:06 -0400 Original-Received: from ceviche.home ([24.201.53.56]) by VL-VM-MR004.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0N440077SNJHVX60@VL-VM-MR004.ip.videotron.ca> for 17262-done@debbugs.gnu.org; Wed, 16 Apr 2014 10:14:05 -0400 (EDT) Original-Received: by ceviche.home (Postfix, from userid 20848) id C68B266644; Wed, 16 Apr 2014 10:13:59 -0400 (EDT) In-reply-to: <877g6yov42.fsf@jidanni.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:88056 Archived-At: > In Perl mode, TAB zaps EOF marker alignment. > $ cat p.pl > print <<\EOF; >
    > EOF > $ emacs p.pl > now do > C-x h runs the command mark-whole-buffer > TAB (translated from ) runs the command indent-for-tab-command > The result is the EOF is no longer hugging the left margin! Indeed, thanks. I've installed the patch below which should fix it, Stefan === modified file 'lisp/progmodes/perl-mode.el' --- lisp/progmodes/perl-mode.el 2014-04-03 00:41:09 +0000 +++ lisp/progmodes/perl-mode.el 2014-04-16 14:11:39 +0000 @@ -903,7 +903,9 @@ ;; following_quotep minimum_paren-depth_this_scan) ;; Parsing stops if depth in parentheses becomes equal to third arg. (setq containing-sexp (nth 1 state))) - (cond ((nth 3 state) 'noindent) ; In a quoted string? + (cond + ;; Don't auto-indent in a quoted string or a here-document. + ((or (nth 3 state) (eq 2 (nth 7 state))) 'noindent) ((null containing-sexp) ; Line is at top level. (skip-chars-forward " \t\f") (if (memq (following-char)