From: Stefan Monnier Date: Wed, 16 Apr 2014 14:13:06 +0000 (-0400) Subject: * lisp/progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in X-Git-Tag: emacs-24.3.91~136 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c76a7a5cd27eb2359f383d481005bf12010f368e;p=emacs.git * lisp/progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in here-documents. Fixes: debbugs:17262 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 50dcc78c947..38f71bdd78d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,12 @@ +2014-04-16 Stefan Monnier + + * progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in + here-documents (bug#17262). + 2014-04-16 Eli Zaretskii - * term/pc-win.el (x-list-fonts, x-get-selection-value): Provide - doc strings, as required by snarf-documentation. + * term/pc-win.el (x-list-fonts, x-get-selection-value): + Provide doc strings, as required by snarf-documentation. 2014-04-15 Stefan Monnier diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 3486c0a1983..f89fec7b1e0 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -903,7 +903,9 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." ;; 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)