Skip to content

Commit 590e1e2

Browse files
committed
Mark haskell-font-lock-latex-cache as buffer-local.
Mark haskell-font-lock-latex-cache-pos and haskell-font-lock-latex-cache-in-comment as buffer local. Otherwise editing two latex files at the same time would result in confusing results.
1 parent 06e0eeb commit 590e1e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

haskell-font-lock.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,13 @@ Returns keywords suitable for `font-lock-keywords'."
448448
(defvar haskell-font-lock-latex-cache-pos nil
449449
"Position of cache point used by `haskell-font-lock-latex-cache-in-comment'.
450450
Should be at the start of a line.")
451+
(make-variable-buffer-local 'haskell-font-lock-latex-cache-pos)
451452

452453
(defvar haskell-font-lock-latex-cache-in-comment nil
453454
"If `haskell-font-lock-latex-cache-pos' is outside a
454455
\\begin{code}..\\end{code} block (and therefore inside a comment),
455456
this variable is set to t, otherwise nil.")
457+
(make-variable-buffer-local 'haskell-font-lock-latex-cache-in-comment)
456458

457459
(defun haskell-font-lock-latex-comments (end)
458460
"Sets `match-data' according to the region of the buffer before end

0 commit comments

Comments
 (0)