[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rainbow-delimiters 5eeddfb2d6 137/188: Test for blacklisti
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rainbow-delimiters 5eeddfb2d6 137/188: Test for blacklisting in rainbow-delimiters--char-ineligible-p. |
Date: |
Sat, 1 Jan 2022 00:58:59 -0500 (EST) |
branch: elpa/rainbow-delimiters
commit 5eeddfb2d649274b75269cf9dd11ae8f9965dcf4
Author: Fanael Linithien <fanael4@gmail.com>
Commit: Fanael Linithien <fanael4@gmail.com>
Test for blacklisting in rainbow-delimiters--char-ineligible-p.
After this change, rainbow-delimiters--apply-color just calls
rainbow-delimiters--propertize-delimiter, so remove it and rename
the latter to the former.
---
rainbow-delimiters.el | 27 +++++++++------------------
1 file changed, 9 insertions(+), 18 deletions(-)
diff --git a/rainbow-delimiters.el b/rainbow-delimiters.el
index 208c43505a..526cbd90ca 100644
--- a/rainbow-delimiters.el
+++ b/rainbow-delimiters.el
@@ -203,7 +203,7 @@ For example: `rainbow-delimiters-depth-1-face'."
rainbow-delimiters-outermost-only-face-count)))))
"-face")))
-(defun rainbow-delimiters--propertize-delimiter (loc depth match)
+(defun rainbow-delimiters--apply-color (loc depth match)
"Highlight a single delimiter at LOC according to DEPTH.
LOC is the location of the character to add text properties to.
@@ -251,7 +251,8 @@ DELIM-SYNTAX-CODE is the `car' of a raw syntax descriptor
at LOC.
Returns t if char at loc meets one of the following conditions:
- Inside a string.
- Inside a comment.
-- Is an escaped char, e.g. ?\)"
+- Is an escaped char, e.g. ?\)
+- Is a blacklisted character."
(or
(nth 3 ppss) ; inside string?
(nth 4 ppss) ; inside comment?
@@ -267,18 +268,8 @@ Returns t if char at loc meets one of the following
conditions:
(t
nil))
(when rainbow-delimiters-escaped-char-predicate
- (funcall rainbow-delimiters-escaped-char-predicate loc))))
-
-(defun rainbow-delimiters--apply-color (depth loc match)
- "Apply color to the delimiter following user settings.
-
-DEPTH is the delimiter depth.
-LOC is the location of delimiters to be highlighted.
-MATCH is nil iff it's a mismatched closing delimiter."
- (unless (memq (char-after loc) rainbow-delimiters-delimiter-blacklist)
- (rainbow-delimiters--propertize-delimiter loc
- depth
- match)))
+ (funcall rainbow-delimiters-escaped-char-predicate loc))
+ (memq (char-after loc) rainbow-delimiters-delimiter-blacklist)))
(defconst rainbow-delimiters--delim-regex "\\s(\\|\\s)"
"Regex matching all opening and closing delimiters the mode highlights.")
@@ -306,13 +297,13 @@ Used by font-lock for dynamic highlighting."
(if (= 4 (logand #xFFFF (car delim-syntax)))
(progn
(setq depth (1+ depth))
- (rainbow-delimiters--apply-color depth
- delim-pos
+ (rainbow-delimiters--apply-color delim-pos
+ depth
t))
;; Not an opening delimiter, so it's a closing delimiter.
(let ((matching-opening-delim (char-after (nth 1 ppss))))
- (rainbow-delimiters--apply-color depth
- delim-pos
+ (rainbow-delimiters--apply-color delim-pos
+ depth
(eq (cdr delim-syntax)
matching-opening-delim))
;; Don't let `depth' go negative, even if there's an unmatched
- [nongnu] elpa/rainbow-delimiters 8012604ea9 132/188: Add maintainership information., (continued)
- [nongnu] elpa/rainbow-delimiters 8012604ea9 132/188: Add maintainership information., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters fb54c05ba0 095/188: Don't enable in special RefTeX modes, ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters f116221d42 076/188: Simplify the logic in rainbow-delimiters-propertize a little..., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 6df71dba8f 091/188: Release version 1.3.11., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 5459aa4c6a 102/188: Simplify rainbow-delimiters-delim-regex., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 756fd642fa 103/188: Release version 1.3.12., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 3143de1136 105/188: Update the readme., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters ccd68b7eb8 107/188: Replace a generalized push with setcdr+cons+cdr., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 3e538315ae 125/188: Point URLs to the new address., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 9ee4a86d47 133/188: Run the test suite under Emacs 23., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 5eeddfb2d6 137/188: Test for blacklisting in rainbow-delimiters--char-ineligible-p.,
ELPA Syncer <=
- [nongnu] elpa/rainbow-delimiters 41546fa1f2 129/188: Fix a typo in the readme., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters daae2c22a6 141/188: Really make Emacs 23 tests less verbose., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 8a2c0374b0 143/188: Use a macro to generate face definitions., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 5435305789 145/188: Move all variables to 'rainbow-delimiters' group., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 798af906df 147/188: Add a test checking if blacklisted delims still contribute to depth., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 58f17c9c4d 149/188: The faces should really use foreground colors., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 0441e7317b 151/188: Add a better escaped delimiter test case., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters b10da10248 154/188: Release version 2.0., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters f91b36bad7 157/188: Use the depth from parse-partial-sexp directly, ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters ac62aa0a53 161/188: Remove useless comments., ELPA Syncer, 2022/01/01