[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/easy-escape a379bdc 05/27: Revert changes when mode is
From: |
ELPA Syncer |
Subject: |
[elpa] externals/easy-escape a379bdc 05/27: Revert changes when mode is disabled |
Date: |
Tue, 14 Sep 2021 17:57:29 -0400 (EDT) |
branch: externals/easy-escape
commit a379bdc6c2e9c94d505932d283d5591fe1c07d54
Author: Clément Pit--Claudel <clement.pitclaudel@live.com>
Commit: Clément Pit--Claudel <clement.pitclaudel@live.com>
Revert changes when mode is disabled
---
easy-escape.el | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/easy-escape.el b/easy-escape.el
index 6700329..9fc230b 100644
--- a/easy-escape.el
+++ b/easy-escape.el
@@ -48,6 +48,11 @@ Good candidates include the following:
Most of these characters require non-standard fonts to display properly,
however."
:group 'easy-escape)
+(defconst easy-escape--keywords
+ '((easy-escape--mark-escapes (0 (easy-escape--compose (match-beginning 0)))
+ (0 'easy-escape-face append)))
+ "Font-lock keyword list used internally")
+
(defun easy-escape--in-string-p (pos)
"Indicate whether POS is inside of a string."
(let ((face (get-text-property pos 'face)))
@@ -78,10 +83,16 @@ and the single slash too subtle, try the following:
* Adjust the foreground of `easy-escape-face'
* Set `easy-escape-character' to a different character."
- nil " ez-esc" nil
- (font-lock-add-keywords nil '((easy-escape--mark-escapes (0
(easy-escape--compose (match-beginning 0)))
- (0
'easy-escape-face prepend))))
- (add-to-list 'font-lock-extra-managed-props 'composition))
+ :lighter " ez-esc"
+ :group 'easy-escape
+ (if easy-escape-minor-mode
+ (progn (font-lock-add-keywords nil easy-escape--keywords)
+ (add-to-list (make-local-variable 'font-lock-extra-managed-props)
'composition))
+ (font-lock-remove-keywords nil easy-escape--keywords))
+ (font-lock-flush))
+
+;;;###autoload
+(add-hook 'lisp-mode-hook 'easy-escape-minor-mode)
(provide 'easy-escape)
;;; easy-escape.el ends here
- [elpa] branch externals/easy-escape created (now e09cc69), ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape baa6091 01/27: Initial commit, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape b7d6596 06/27: Add copyright notice, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape ad76064 07/27: Add screenshots, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape c7ee1cb 02/27: Add autoload and clean up easy-escape-character list, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape caea5e0 04/27: Rename to easy-escape-minor-mode, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape c35994a 08/27: Add README, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape f83079c 09/27: Fix image name, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape bcdc7f9 13/27: Remove the lexical-binding declaration, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape a379bdc 05/27: Revert changes when mode is disabled,
ELPA Syncer <=
- [elpa] externals/easy-escape cb88404 10/27: Remove example from README, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape fb73cb5 11/27: Update README and add package header, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape 2510683 16/27: Add emacs-lisp hook to README, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape c87d76e 17/27: Suppress spurious warning, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape a6449f2 20/27: Clean up screenshot code, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape 213d339 14/27: Don't use font-lock-flush in Emacs < 25, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape 8623aa9 18/27: Hide backslashes before '(', ')', and '|', ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape 02f4bfc 03/27: Fix mode lighter, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape eacfc5d 12/27: Don't enable by default, ELPA Syncer, 2021/09/14
- [elpa] externals/easy-escape fb3e713 15/27: Fix typo in README, ELPA Syncer, 2021/09/14