[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master edbb191 13/21: Feature-detect prettify-symbols-mode for Em
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master edbb191 13/21: Feature-detect prettify-symbols-mode for Emacs 24.3 compat. |
Date: |
Fri, 23 Dec 2016 20:27:52 +0000 (UTC) |
branch: master
commit edbb1919960d10c74e8ee3d7ad59493ba50538bf
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Feature-detect prettify-symbols-mode for Emacs 24.3 compat.
---
context-coloring-test.el | 46 ++++++++++++++++++++++++----------------------
context-coloring.el | 2 +-
2 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/context-coloring-test.el b/context-coloring-test.el
index 5ab7d60..79e5f23 100644
--- a/context-coloring-test.el
+++ b/context-coloring-test.el
@@ -344,28 +344,30 @@ signaled."
'(context-coloring-level-0-face nil))
(disable-theme 'context-coloring-test-custom-theme)))
-(defun context-coloring-test-assert-prettify-symbols-text-properties ()
- (unless (and (get-text-property 2 'prettify-symbols-start)
- (get-text-property 2 'prettify-symbols-end))
- (ert-fail "Expected buffer to have it's symbols prettified, but it
didn't.")))
-
-(context-coloring-test-deftest prettify-symbols-enabled-before
- (lambda ()
- (context-coloring-test-with-fixture
- "./fixtures/test/prettify-symbols.el"
- (emacs-lisp-mode)
- (prettify-symbols-mode)
- (context-coloring-mode)
- (context-coloring-test-assert-prettify-symbols-text-properties))))
-
-(context-coloring-test-deftest prettify-symbols-enabled-after
- (lambda ()
- (context-coloring-test-with-fixture
- "./fixtures/test/prettify-symbols.el"
- (emacs-lisp-mode)
- (context-coloring-mode)
- (prettify-symbols-mode)
- (context-coloring-test-assert-prettify-symbols-text-properties))))
+(when (fboundp 'prettify-symbols-mode)
+
+ (defun context-coloring-test-assert-prettify-symbols-text-properties ()
+ (unless (and (get-text-property 2 'prettify-symbols-start)
+ (get-text-property 2 'prettify-symbols-end))
+ (ert-fail "Expected buffer to have it's symbols prettified, but it
didn't.")))
+
+ (context-coloring-test-deftest prettify-symbols-enabled-before
+ (lambda ()
+ (context-coloring-test-with-fixture
+ "./fixtures/test/prettify-symbols.el"
+ (emacs-lisp-mode)
+ (prettify-symbols-mode)
+ (context-coloring-mode)
+
(context-coloring-test-assert-prettify-symbols-text-properties))))
+
+ (context-coloring-test-deftest prettify-symbols-enabled-after
+ (lambda ()
+ (context-coloring-test-with-fixture
+ "./fixtures/test/prettify-symbols.el"
+ (emacs-lisp-mode)
+ (context-coloring-mode)
+ (prettify-symbols-mode)
+
(context-coloring-test-assert-prettify-symbols-text-properties)))))
;;; Coloring tests
diff --git a/context-coloring.el b/context-coloring.el
index 1429f66..784fdbb 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -381,7 +381,7 @@ completes.")
(defvar context-coloring-fontify-keywords-predicates
(list
- (lambda () prettify-symbols-mode))
+ (lambda () (and (boundp 'prettify-symbols-mode) prettify-symbols-mode)))
"Cases where the whole buffer should have keywords fontified.
Necessary in cases where a mode relies on fontifications in
regions where Context Coloring doesn't happen to touch.")
- [elpa] master 54593e5 11/21: Add Emacs 25.1 to the build matrix., (continued)
- [elpa] master 54593e5 11/21: Add Emacs 25.1 to the build matrix., Jackson Ray Hamilton, 2016/12/23
- [elpa] master abded5f 14/21: Check for compositions on old Emacsen., Jackson Ray Hamilton, 2016/12/23
- [elpa] master 269a382 15/21: Ensure coloring still works after prettification., Jackson Ray Hamilton, 2016/12/23
- [elpa] master b3ea138 19/21: Remove no-byte-compile from development files., Jackson Ray Hamilton, 2016/12/23
- [elpa] master ce29abd 17/21: Don't color before or beyond the buffer., Jackson Ray Hamilton, 2016/12/23
- [elpa] master 45b5ad0 16/21: Merge pull request #5 from jacksonrayhamilton/prettify-symbols, Jackson Ray Hamilton, 2016/12/23
- [elpa] master 5fe3695 07/21: Revert "Clean up local variable.", Jackson Ray Hamilton, 2016/12/23
- [elpa] master 550e61b 08/21: Merge branch 'master' into prettify-symbols, Jackson Ray Hamilton, 2016/12/23
- [elpa] master a1a6256 05/21: Set up post-colorize hooks., Jackson Ray Hamilton, 2016/12/23
- [elpa] master 4836dd0 10/21: Add tests for prettifying symbols., Jackson Ray Hamilton, 2016/12/23
- [elpa] master edbb191 13/21: Feature-detect prettify-symbols-mode for Emacs 24.3 compat.,
Jackson Ray Hamilton <=
- [elpa] master 3985437 09/21: Use a mode hook for detecting entering Prettify Symbols mode., Jackson Ray Hamilton, 2016/12/23
- [elpa] master 1b30a28 20/21: Version 8.1.0., Jackson Ray Hamilton, 2016/12/23
- [elpa] master 5402f35 21/21: Merge commit '1b30a28857727202d1f6a027f83ad66151fb1e92' from context-coloring, Jackson Ray Hamilton, 2016/12/23