summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2018-07-01 11:39:03 +0000
committerAlan Mackenzie <acm@muc.de>2018-07-01 11:39:03 +0000
commit4a9b24e1780c980d033b44f3c86133bbab691ebe (patch)
tree400c23dcd89d63c01c9f4a39c330efb90bf93951 /lisp/progmodes
parent76eda952b09db6d79342b7ddfcae45c7c836ab62 (diff)
downloademacs-scratch/fontify-open-string.tar.gz
Initial commit. Allow wanted fontification of open string in any mode.scratch/fontify-open-string
The wanted fontification is for the string face to end at the first unescaped newline. This is achieved by a new syntax flag `s' on NL, which means "terminate any open string". src/syntax.c (SYNTAX_FLAGS_CLOSE_STRING, back_maybe_string): New functions. (Fstring_to_syntax, Finternal_describe_syntax_value, scan_lists) (scan_sexps_forward): Adapt to handle the `s' flag. lisp/font-lock.el (font-lock-warn-open-string): New defcustom. (font-lock-fontify-syntactically-region): Enhance to fontify " with warning-face. lisp/progmodes/sh-script.el (sh-mode-syntax-table): Add flag `s' to syntax entry for \n.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/sh-script.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index aaa86b5816f..bf760e0a6cc 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -429,7 +429,7 @@ name symbol."
(defvar sh-mode-syntax-table
(sh-mode-syntax-table ()
?\# "<"
- ?\n ">#"
+ ?\n ">#s"
?\" "\"\""
?\' "\"'"
?\` "\"`"