From 867cab7493ffdaa9de2b06db573a5f6290a2042f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 Aug 2011 18:10:21 -0400 Subject: [PATCH] * lisp/progmodes/sh-script.el (sh-maybe-here-document): Disable magic in strings and comments. Fixes: debbugs:9333 --- lisp/ChangeLog | 3 +++ lisp/progmodes/sh-script.el | 2 ++ 2 files changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4efa1de8e43..82d67fe476d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-08-22 Stefan Monnier + * progmodes/sh-script.el (sh-maybe-here-document): Disable magic in + strings and comments (bug#9333). + * emacs-lisp/debug.el (debug-arglist): New function. (debug-convert-byte-code): Use it. Handle lexical byte-codes. (debug-on-entry-1): Handle interpreted closures (bug#9120). diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 31a4fbaef4d..7b949134c6c 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -460,6 +460,7 @@ This is buffer-local in every such buffer.") (define-key map "\C-c+" 'sh-add) (define-key map "\C-\M-x" 'sh-execute-region) (define-key map "\C-c\C-x" 'executable-interpret) + ;; FIXME: Use post-self-insert-hook. (define-key map "<" 'sh-maybe-here-document) (define-key map "(" 'skeleton-pair-insert-maybe) (define-key map "{" 'skeleton-pair-insert-maybe) @@ -3659,6 +3660,7 @@ The document is bounded by `sh-here-document-word'." (save-excursion (backward-char 2) (sh-quoted-p)) + (nth 8 (syntax-ppss)) (let ((tabs (if (string-match "\\`-" sh-here-document-word) (make-string (/ (current-indentation) tab-width) ?\t) "")) -- 2.39.2