GNU bug report logs -
#8053
shell-script mode <<EOF not case sensitive
Previous Next
Reported by: jidanni <at> jidanni.org
Date: Wed, 16 Feb 2011 12:23:02 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
jidanni <at> jidanni.org 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 <wence <at> gmx.li>
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 <wence <at> gmx.li>
+
+ * 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 <deniz.a.m.dogan <at> gmail.com>
* 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 <wence <at> gmx.li>
This bug report was last modified 14 years and 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.