* bug#8053: shell-script mode <<EOF not case sensitive
@ 2011-02-16 12:08 jidanni
2011-02-17 12:49 ` Lawrence Mitchell
0 siblings, 1 reply; 3+ messages in thread
From: jidanni @ 2011-02-16 12:08 UTC (permalink / raw)
To: 8053
$ 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#8053: shell-script mode <<EOF not case sensitive
2011-02-16 12:08 bug#8053: shell-script mode <<EOF not case sensitive jidanni
@ 2011-02-17 12:49 ` Lawrence Mitchell
2011-02-18 21:47 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Lawrence Mitchell @ 2011-02-17 12:49 UTC (permalink / raw)
To: bug-gnu-emacs
jidanni@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@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@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@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@gmx.li>
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-18 21:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16 12:08 bug#8053: shell-script mode <<EOF not case sensitive jidanni
2011-02-17 12:49 ` Lawrence Mitchell
2011-02-18 21:47 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.