1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
Author: Gunnar Wolf <gwolf@debian.org>
Last-Update: 2013-05-27
Forwarded: no
Description: Fix call to deprecated font-lock-syntactic-keywords
From Emacs24's NEWS:
.
*** New variable `syntax-propertize-function'.
This replaces `font-lock-syntactic-keywords' which is now obsolete.
This allows syntax-table properties to be set independently from font-lock:
just call syntax-propertize to make sure the text is propertized.
Together with this new variable come a new hook
syntax-propertize-extend-region-functions, as well as two helper functions:
syntax-propertize-via-font-lock to reuse old font-lock-syntactic-keywords
as-is; and syntax-propertize-rules which provides a new way to specify
syntactic rules.
Index: haml-elisp/haml-mode.el
===================================================================
--- haml-elisp.orig/haml-mode.el 2013-05-27 13:11:39.000000000 -0500
+++ haml-elisp/haml-mode.el 2013-05-27 13:12:52.000000000 -0500
@@ -130,13 +130,15 @@
(save-match-data
(let ((font-lock-keywords keywords)
(font-lock-syntax-table syntax-table)
- (font-lock-syntactic-keywords syntactic-keywords)
(syntax-propertize-function syntax-propertize-fn)
(font-lock-multiline 'undecided)
(font-lock-dont-widen t)
font-lock-keywords-only
font-lock-extend-region-functions
font-lock-keywords-case-fold-search)
+ (when (< emacs-major-version 24)
+ (let (font-lock-syntactic-keywords syntactic-keywords)))
+
(save-restriction
(narrow-to-region (1- beg) end)
;; font-lock-fontify-region apparently isn't inclusive,
|