Skip to content

Commit 0d7d89f

Browse files
committed
Delete some code for very old Emacs versions, and formalise dependency on Emacs 24
1 parent 66c17ec commit 0d7d89f

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

purescript-font-lock.el

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@
134134
"Face with which to fontify literate comments.
135135
Set to `default' to avoid fontification of them.")
136136

137-
(defconst purescript-emacs21-features (string-match "[[:alpha:]]" "x")
138-
"Non-nil if we have regexp char classes.
139-
Assume this means we have other useful features from Emacs 21.")
140-
141137
;; The font lock regular expressions.
142138
(defun purescript-font-lock-keywords-create (literate)
143139
"Create fontification definitions for PureScript scripts.
@@ -187,15 +183,6 @@ Returns keywords suitable for `font-lock-keywords'."
187183
"infixr" "instance" "let" "module" "newtype" "of"
188184
"then" "type" "where" "_") 'words))
189185

190-
;; This unreadable regexp matches strings and character
191-
;; constants. We need to do this with one regexp to handle
192-
;; stuff like '"':"'". The regexp is the composition of
193-
;; "([^"\\]|\\.)*" for strings and '([^\\]|\\.[^']*)' for
194-
;; characters, allowing for string continuations.
195-
;; Could probably be improved...
196-
(string-and-char
197-
(concat "\\(\\(\"\\|" line-prefix "[ \t]*\\\\\\)\\([^\"\\\\\n]\\|\\\\.\\)*\\(\"\\|\\\\[ \t]*$\\)\\|'\\([^'\\\\\n]\\|\\\\.[^'\n]*\\)'\\)"))
198-
199186
;; Top-level declarations
200187
(topdecl-var
201188
(concat line-prefix "\\(" varid "\\)\\s-*"
@@ -222,9 +209,6 @@ Returns keywords suitable for `font-lock-keywords'."
222209
("^=======" 0 'font-lock-warning-face t)
223210
("^>>>>>>> .*$" 0 'font-lock-warning-face t)
224211
("^#.*$" 0 'font-lock-preprocessor-face t)
225-
,@(unless purescript-emacs21-features ;Supports nested comments?
226-
;; Expensive.
227-
`((,string-and-char 1 font-lock-string-face)))
228212

229213
(,reservedid 1 (symbol-value 'purescript-keyword-face))
230214
(,reservedsym 1 (symbol-value 'purescript-operator-face))

purescript-mode-pkg.el.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
(define-package "purescript-mode" "@VERSION@" "A PureScript editing mode"
2-
'((cl-lib "0.6")))
2+
'((emacs "24") (cl-lib "0.6")))

0 commit comments

Comments
 (0)