[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5f51ad4 03/25: Don't use derived-mode-parent dispatches.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 5f51ad4 03/25: Don't use derived-mode-parent dispatches. |
Date: |
Mon, 30 May 2016 22:10:44 +0000 (UTC) |
branch: master
commit 5f51ad4c74cc595bcc10460f3901094932e156f5
Author: Jackson Hamilton <address@hidden>
Commit: Jackson Hamilton <address@hidden>
Don't use derived-mode-parent dispatches.
---
context-coloring.el | 9 +++------
test/context-coloring-test.el | 8 --------
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index 0a8e22c..b8de781 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -1217,16 +1217,13 @@ It could be a quoted or backquoted expression."
(defun context-coloring-get-current-dispatch ()
"Return the first dispatch appropriate for the current state."
(let ((predicates context-coloring-dispatch-predicates)
- (parent major-mode)
dispatch)
;; Maybe a predicate will be satisfied and return a dispatch.
(while (and predicates
(not (setq dispatch (funcall (pop predicates))))))
;; If not, maybe a major mode (or a derivative) will define a dispatch.
(when (not dispatch)
- (while (and parent
- (not (setq dispatch (gethash parent
context-coloring-mode-hash-table)))
- (setq parent (get parent 'derived-mode-parent)))))
+ (setq dispatch (gethash major-mode context-coloring-mode-hash-table)))
dispatch))
(defun context-coloring-define-dispatch (symbol &rest properties)
@@ -1300,7 +1297,7 @@ override `context-coloring-default-delay'.
(context-coloring-define-dispatch
'javascript
- :modes '(js2-mode)
+ :modes '(js2-mode js2-jsx-mode)
:colorizer #'context-coloring-js2-colorize
:setup
(lambda ()
@@ -1311,7 +1308,7 @@ override `context-coloring-default-delay'.
(context-coloring-define-dispatch
'emacs-lisp
- :modes '(emacs-lisp-mode)
+ :modes '(emacs-lisp-mode lisp-interaction-mode)
:colorizer #'context-coloring-elisp-colorize
:delay 0.016 ;; Thanks to lazy colorization this can be 60 frames per second.
:setup #'context-coloring-setup-idle-change-detection
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index 6f155b6..e064093 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -267,14 +267,6 @@ signaled."
"Context coloring is unavailable here"
"*Messages*")))
-(context-coloring-test-deftest derived-mode
- (lambda ()
- (lisp-interaction-mode)
- (context-coloring-mode)
- (context-coloring-test-assert-not-message
- "Context coloring is unavailable here"
- "*Messages*")))
-
(context-coloring-test-deftest unavailable-message-ignored
(lambda ()
(minibuffer-with-setup-hook
- [elpa] master 09aef2a 09/25: Add an .elpaignore file., (continued)
- [elpa] master 09aef2a 09/25: Add an .elpaignore file., Jackson Ray Hamilton, 2016/05/30
- [elpa] master a9b988e 13/25: Fix improperly prepared test., Jackson Ray Hamilton, 2016/05/30
- [elpa] master 7d284ad 21/25: Remove overly-optimistic delay on Emacs Lisp coloring., Jackson Ray Hamilton, 2016/05/30
- [elpa] master d745846 07/25: Make js2-mode a development dependency., Jackson Ray Hamilton, 2016/05/30
- [elpa] master 455a743 22/25: Version 8.0.0., Jackson Ray Hamilton, 2016/05/30
- [elpa] master a164992 23/25: Don't byte compile development files., Jackson Ray Hamilton, 2016/05/30
- [elpa] master f9a2481 06/25: Autoload dispatches., Jackson Ray Hamilton, 2016/05/30
- [elpa] master 968d9f2 12/25: Make keywords in comments and strings coloring customizable., Jackson Ray Hamilton, 2016/05/30
- [elpa] master f654157 04/25: Update copyright years., Jackson Ray Hamilton, 2016/05/30
- [elpa] master 4c9a3fc 16/25: Reorganize files., Jackson Ray Hamilton, 2016/05/30
- [elpa] master 5f51ad4 03/25: Don't use derived-mode-parent dispatches.,
Jackson Ray Hamilton <=
- [elpa] master a42b53e 05/25: Separate language support into separate features., Jackson Ray Hamilton, 2016/05/30
- [elpa] master 1cb5b98 11/25: Merge branch 'plugins', Jackson Ray Hamilton, 2016/05/30
- [elpa] master 6ee4481 25/25: Merge commit '3007b2917d71a7d66eb94876536dfd80b0661d40' from context-coloring, Jackson Ray Hamilton, 2016/05/30