branch: elpa/d-mode
commit 8318eefda72119f871dd86e14551c8d8d1af4a77
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>

    tests: Work around 24.3 oddity to fix fontification tests
---
 d-mode-test.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/d-mode-test.el b/d-mode-test.el
index a9cf858..56b4f04 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -264,6 +264,13 @@ If the resulting indentation ends up being different, 
raise an error."
 Compares fontification against a test file (same file name, with
 a '.html' suffix).  If the result ends up being different from
 the reference file, raise an error."
+  ;; Work around 24.3 oddity
+  (when (and
+        (boundp 'c-standard-font-lock-fontify-region-function)
+        (null c-standard-font-lock-fontify-region-function))
+    (setq c-standard-font-lock-fontify-region-function
+         (default-value 'font-lock-fontify-region-function)))
+
   (let* ((hfy-optimisations '(body-text-only merge-adjacent-tags))
         (actual (with-current-buffer (htmlfontify-buffer nil "test.d") 
(buffer-string)))
         (expected (with-temp-buffer

Reply via email to