[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2487c3a 07/12: Fix eval-expression detection.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 2487c3a 07/12: Fix eval-expression detection. |
Date: |
Sun, 21 Jun 2015 21:16:14 +0000 |
branch: master
commit 2487c3ab64f11c4b3d7ac883f95d5e2830e8f0f8
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Fix eval-expression detection.
---
context-coloring.el | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index 6685ff2..1967cdf 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -1044,6 +1044,10 @@ It could be a quoted or backquoted expression."
;;; eval-expression colorization
+(defun context-coloring-eval-expression-match ()
+ "Determine where expression starts in `eval-expression'."
+ (string-match "\\`Eval: " (buffer-string)))
+
(defun context-coloring-eval-expression-colorize ()
"Color the `eval-expression' minibuffer prompt as elisp."
(interactive)
@@ -1051,7 +1055,7 @@ It could be a quoted or backquoted expression."
(lambda ()
(context-coloring-elisp-colorize-region-initially
(progn
- (string-match "\\`Eval: " (buffer-string))
+ (context-coloring-eval-expression-match)
(1+ (match-end 0)))
(point-max)))))
@@ -1171,7 +1175,8 @@ override `context-coloring-default-delay'.
;; rely on this predicate instead.
(defun context-coloring-eval-expression-predicate ()
"Non-nil if the minibuffer is for `eval-expression'."
- (eq this-command 'eval-expression))
+ ;; Kinda better than checking `this-command', because `this-command' changes.
+ (context-coloring-eval-expression-match))
(context-coloring-define-dispatch
'eval-expression
- [elpa] master updated (afda2e6 -> 98073fe), Jackson Ray Hamilton, 2015/06/21
- [elpa] master f0bc797 04/12: Use old advice for Emacs 24.3., Jackson Ray Hamilton, 2015/06/21
- [elpa] master 89f862a 03/12: Minutia., Jackson Ray Hamilton, 2015/06/21
- [elpa] master 2487c3a 07/12: Fix eval-expression detection.,
Jackson Ray Hamilton <=
- [elpa] master b31aa52 05/12: Automatically determine the maximum face., Jackson Ray Hamilton, 2015/06/21
- [elpa] master 8d54c2e 08/12: Suppress unavailable messages in minibuffer., Jackson Ray Hamilton, 2015/06/21
- [elpa] master 32b276e 11/12: Version 7.0.0., Jackson Ray Hamilton, 2015/06/21
- [elpa] master ef0c4da 09/12: Cleanup refactoring artifacts., Jackson Ray Hamilton, 2015/06/21
- [elpa] master 354ac23 06/12: Checkdoc compliance., Jackson Ray Hamilton, 2015/06/21
- [elpa] master cbffe2a 02/12: Remove automatic theming., Jackson Ray Hamilton, 2015/06/21
- [elpa] master 92d3d12 01/12: Remove asynchronous support., Jackson Ray Hamilton, 2015/06/21
- [elpa] master 1bebaa4 10/12: Merge branch 'debt', Jackson Ray Hamilton, 2015/06/21
- [elpa] master 98073fe 12/12: Merge commit '32b276e96118f9e34f4cf9a5a2ae6cae3e772144' from context-coloring, Jackson Ray Hamilton, 2015/06/21