diff lisp/progmodes/sh-script.el @ 104298:75f3a35d516e

* progmodes/sh-script.el (sh-maybe-here-document): Avoid inserting another heredoc if the user adds another < (Bug#3226).
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 16 Aug 2009 14:04:25 +0000
parents 69c0814ddb4e
children afa0e028ba97
line wrap: on
line diff
--- a/lisp/progmodes/sh-script.el	Sun Aug 16 12:23:23 2009 +0000
+++ b/lisp/progmodes/sh-script.el	Sun Aug 16 14:04:25 2009 +0000
@@ -3749,7 +3749,7 @@
   (interactive "*P")
   (self-insert-command (prefix-numeric-value arg))
   (or arg
-      (not (eq (char-after (- (point) 2)) last-command-event))
+      (not (looking-back "[^<]<<"))
       (save-excursion
 	(backward-char 2)
 	(sh-quoted-p))