Override syntax properties for angle brackets appearing in left/right single arrows

This commit is contained in:
Tony Garnock-Jones 2019-11-01 12:00:55 +00:00
parent 0832b94ce9
commit 1054cd4219
1 changed files with 6 additions and 0 deletions

View File

@ -87,6 +87,11 @@
'font-lock-keyword-face)
))
(defvar preserves-syntax-propertize-function
(syntax-propertize-rules
("->" (0 "_"))
("<-" (0 "_"))))
(defun preserves-mode-variables ()
(make-local-variable 'comment-use-syntax)
(make-local-variable 'comment-start)
@ -100,6 +105,7 @@
(setq font-lock-defaults '(preserves-font-lock-keywords nil nil ()))
(make-local-variable 'indent-line-function)
(setq indent-line-function #'preserves-indent-line)
(setq syntax-propertize-function preserves-syntax-propertize-function)
)
(defvar preserves-indent-basic 2