Fix highlighting of quotes in shell scripts.

Original patch for sh and ksh by Shawn McMahon <smcmahon@eiv.com>.

 -- Tim Retout <tim@retout.co.uk>  Thu, 25 Oct 2007 23:27:15 +0100

diff --git a/states/hl/bash.st b/states/hl/bash.st
index a99eac0..6b61577 100644
--- a/states/hl/bash.st
+++ b/states/hl/bash.st
@@ -22,6 +22,17 @@ state bash extends HighlightEntry
     string_face (false);
   }
 
+  /* Ignore escaped quote marks */
+  /\\\"/ {
+    language_print ($0);
+  }
+  /\\\'/ {
+    language_print ($0);
+  }
+  /\\\`/ {
+    language_print ($0);
+  }
+
   /* Excutable script. */
   /^#!/ {
     reference_face (true);
diff --git a/states/hl/csh.st b/states/hl/csh.st
index 553b1d7..34e2a37 100644
--- a/states/hl/csh.st
+++ b/states/hl/csh.st
@@ -22,6 +22,17 @@ state csh extends HighlightEntry
     string_face (false);
   }
 
+  /* Ignore escaped quote marks */
+  /\\\"/ {
+    language_print ($0);
+  }
+  /\\\'/ {
+    language_print ($0);
+  }
+  /\\\`/ {
+    language_print ($0);
+  }
+
   /* Excutable script. From sh */
   /^#!/ {
     reference_face (true);
diff --git a/states/hl/ksh.st b/states/hl/ksh.st
index 41b039d..17c7219 100644
--- a/states/hl/ksh.st
+++ b/states/hl/ksh.st
@@ -26,6 +26,17 @@ state ksh extends HighlightEntry
     string_face (false);
   }
 
+  /* Ignore escaped quote marks */
+  /\\\"/ {
+    language_print ($0);
+  }
+  /\\\'/ {
+    language_print ($0);
+  }
+  /\\\`/ {
+    language_print ($0);
+  }
+
   /* Excutable script. */
   /^#!/ {
     reference_face (true);
diff --git a/states/hl/sh.st b/states/hl/sh.st
index c0b7d3c..b034f16 100644
--- a/states/hl/sh.st
+++ b/states/hl/sh.st
@@ -22,6 +22,17 @@ state sh extends HighlightEntry
     string_face (false);
   }
 
+  /* Ignore escaped quote marks */
+  /\\\"/ {
+    language_print ($0);
+  }
+  /\\\'/ {
+    language_print ($0);
+  }
+  /\\\`/ {
+    language_print ($0);
+  }
+
   /* Excutable script. */
   /^#!/ {
     reference_face (true);
diff --git a/states/hl/tcsh.st b/states/hl/tcsh.st
index c9ec499..d3475b4 100644
--- a/states/hl/tcsh.st
+++ b/states/hl/tcsh.st
@@ -22,6 +22,17 @@ state tcsh extends HighlightEntry
     string_face (false);
   }
 
+  /* Ignore escaped quote marks */
+  /\\\"/ {
+    language_print ($0);
+  }
+  /\\\'/ {
+    language_print ($0);
+  }
+  /\\\`/ {
+    language_print ($0);
+  }
+
   /* Excutable script. From sh */
   /^#!/ {
     reference_face (true);
diff --git a/states/hl/zsh.st b/states/hl/zsh.st
index 64be45e..a367f7f 100644
--- a/states/hl/zsh.st
+++ b/states/hl/zsh.st
@@ -22,6 +22,17 @@ state zsh extends HighlightEntry
     string_face (false);
   }
 
+  /* Ignore escaped quote marks */
+  /\\\"/ {
+    language_print ($0);
+  }
+  /\\\'/ {
+    language_print ($0);
+  }
+  /\\\`/ {
+    language_print ($0);
+  }
+
   /* Excutable script. */
   /^#!/ {
     reference_face (true);
