bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8053: shell-script mode <<EOF not case sensitive


From: Lawrence Mitchell
Subject: bug#8053: shell-script mode <<EOF not case sensitive
Date: Thu, 17 Feb 2011 12:49:48 +0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

address@hidden wrote:
> $ cat m.sh
> cat <<EOF
> This line is inside the here doc
> eof
> So is this, but shell-script mode doesn't think so. Otherwise the color
> would be the same.
> EOF
> $ emacs -Q m.sh

case-fold-search should be bound to nil in
sh-syntax-propertize-here-doc

Here's a patch:

>From f7731d08aeb4c72c85e91f1fb1d9b1ee1bc59856 Mon Sep 17 00:00:00 2001
From: Lawrence Mitchell <address@hidden>
Date: Thu, 17 Feb 2011 12:48:29 +0000
Subject: [PATCH] Make search for end of here-doc case sensitive

* progmodes/sh-script.el (sh-syntax-propertize-here-doc): Bind
case-fold-search to nil when looking for end of here-doc.
---
 lisp/ChangeLog              |    5 +++++
 lisp/progmodes/sh-script.el |    3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c204b87..efbbfe1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-17  Lawrence Mitchell  <address@hidden>
+
+       * progmodes/sh-script.el (sh-syntax-propertize-here-doc): Bind
+       case-fold-search to nil when looking for end of here-doc.
+
 2011-02-09  Deniz Dogan  <address@hidden>
 
        * net/rcirc.el (rcirc-ctcp-sender-PING): Simplifying.
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index d80d814..ecbac26 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -969,7 +969,8 @@ Point is at the beginning of the next line."
 (defun sh-syntax-propertize-here-doc (end)
   (let ((ppss (syntax-ppss)))
     (when (eq t (nth 3 ppss))
-      (let ((key (get-text-property (nth 8 ppss) 'sh-here-doc-marker)))
+      (let ((key (get-text-property (nth 8 ppss) 'sh-here-doc-marker))
+            (case-fold-search nil))
         (when (re-search-forward
                (concat "^\\([ \t]*\\)" (regexp-quote key) "\\(\n\\)")
                end 'move)
-- 
Lawrence Mitchell <address@hidden>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]