Function: gnuplot--syntax-propertize
gnuplot--syntax-propertize is a natively compiled function defined in
gnuplot.el.
Signature
(gnuplot--syntax-propertize START END)
Source Code
;; Defined in /nix/store/xvcy7r1jiw71avhnh6kmin403kpqrdhc-emacs-packages-deps/share/emacs/site-lisp/elpa/gnuplot-20260623.1111/gnuplot.el
;; Some corner cases in Gnuplot's comment and string syntax are
;; difficult to handle accurately using Emacs's built-in syntax tables
;; and parser:
;;
;; - strings can continue over several lines, but only by using a
;; backslash to escape the newline
;;
;; - double-quoted strings can contain escaped quotes, \", and escaped
;; backslashes, \\; but in single-quoted strings the quote is
;; escaped by doubling it, '', and backslash is only special at
;; end-of-line
;;
;; - either type of string can end at newline without needing a
;; - closing delimiter
;;
;; - comments continue over continuation lines
;;
;; The following syntax-propertize rules should accurately mark string
;; and comment boundaries using the "generic string fence" and
;; "generic comment fence" syntax properties.
(defalias 'gnuplot--syntax-propertize
(syntax-propertize-rules
;; Double quoted strings
((rx
(group "\"")
(* (or (seq "\\" anything)
(not (any "\"" "\n"))))
(group (or "\"" "\n" buffer-end)))
(1 "|") (2 "|"))
;; Single quoted strings
((rx
(group "'")
(* (or (seq "\\" "\n")
"''"
(not (any "'" "\n"))))
(group (or "'" "\n" buffer-end)))
(1 "|") (2 "|"))
;; Comments
((rx
(group "#")
(* (or (seq "\\" "\n")
any))
(or (group "\n") buffer-end))
(1 "!") (2 "!"))))