]> git.eshelyaron.com Git - emacs.git/commit
Initial commit. Allow wanted fontification of open string in any mode. scratch/fontify-open-string
authorAlan Mackenzie <acm@muc.de>
Sun, 1 Jul 2018 11:39:03 +0000 (11:39 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 1 Jul 2018 11:39:03 +0000 (11:39 +0000)
commit4a9b24e1780c980d033b44f3c86133bbab691ebe
tree400c23dcd89d63c01c9f4a39c330efb90bf93951
parent76eda952b09db6d79342b7ddfcae45c7c836ab62
Initial commit.  Allow wanted fontification of open string in any mode.

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.
lisp/font-lock.el
lisp/progmodes/sh-script.el
src/syntax.c