]> code.delx.au - gnu-emacs/commitdiff
* lisp/progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 16 Apr 2014 14:13:06 +0000 (10:13 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 16 Apr 2014 14:13:06 +0000 (10:13 -0400)
here-documents.

Fixes: debbugs:17262
lisp/ChangeLog
lisp/progmodes/perl-mode.el

index 50dcc78c9475f7167aa788a6b328d9b49779c1c0..38f71bdd78d45950c2fdcb5676f8204daff409de 100644 (file)
@@ -1,7 +1,12 @@
+2014-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in
+       here-documents (bug#17262).
+
 2014-04-16  Eli Zaretskii  <eliz@gnu.org>
 
-       * 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  <monnier@iro.umontreal.ca>
 
index 3486c0a19838a16f60eace2fd16ac1edd8fe482a..f89fec7b1e0d9495d4e774e7b8118a670d80dd11 100644 (file)
@@ -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)