Skip to content

Commit 23896ab

Browse files
committed
purescript-font-lock.el: remove purescript-fl-latex-cache-in-comment
It is unused and apparently was some legacy from Emacs 21 from long ago.
1 parent a5fb6ec commit 23896ab

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

purescript-font-lock.el

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -238,55 +238,6 @@ Returns keywords suitable for `font-lock-keywords'."
238238
purescript-constructor-face
239239
purescript-operator-face)))))
240240

241-
;; The next three aren't used in Emacs 21.
242-
243-
(defvar purescript-fl-latex-cache-pos nil
244-
"Position of cache point used by `purescript-fl-latex-cache-in-comment'.
245-
Should be at the start of a line.")
246-
247-
(defvar purescript-fl-latex-cache-in-comment nil
248-
"If `purescript-fl-latex-cache-pos' is outside a
249-
\\begin{code}..\\end{code} block (and therefore inside a comment),
250-
this variable is set to t, otherwise nil.")
251-
252-
(defun purescript-fl-latex-comments (end)
253-
"Sets `match-data' according to the region of the buffer before end
254-
that should be commented under LaTeX-style literate scripts."
255-
(let ((start (point)))
256-
(if (= start end)
257-
;; We're at the end. No more to fontify.
258-
nil
259-
(if (not (eq start purescript-fl-latex-cache-pos))
260-
;; If the start position is not cached, calculate the state
261-
;; of the start.
262-
(progn
263-
(setq purescript-fl-latex-cache-pos start)
264-
;; If the previous \begin{code} or \end{code} is a
265-
;; \begin{code}, then start is not in a comment, otherwise
266-
;; it is in a comment.
267-
(setq purescript-fl-latex-cache-in-comment
268-
(if (and
269-
(re-search-backward
270-
"^\\(\\(\\\\begin{code}\\)\\|\\(\\\\end{code}\\)\\)$"
271-
(point-min) t)
272-
(match-end 2))
273-
nil t))
274-
;; Restore position.
275-
(goto-char start)))
276-
(if purescript-fl-latex-cache-in-comment
277-
(progn
278-
;; If start is inside a comment, search for next \begin{code}.
279-
(re-search-forward "^\\\\begin{code}$" end 'move)
280-
;; Mark start to end of \begin{code} (if present, till end
281-
;; otherwise), as a comment.
282-
(set-match-data (list start (point)))
283-
;; Return point, as a normal regexp would.
284-
(point))
285-
;; If start is inside a code block, search for next \end{code}.
286-
(if (re-search-forward "^\\\\end{code}$" end t)
287-
;; If one found, mark it as a comment, otherwise finish.
288-
(point))))))
289-
290241
(defconst purescript-basic-syntactic-keywords
291242
'(;; Character constants (since apostrophe can't have string syntax).
292243
;; Beware: do not match something like 's-}' or '\n"+' since the first '

0 commit comments

Comments
 (0)