[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rainbow-delimiters 402a9e8e04 152/188: Treat the ? as a qu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rainbow-delimiters 402a9e8e04 152/188: Treat the ? as a quote character only when it starts a symbol. |
Date: |
Sat, 1 Jan 2022 00:59:00 -0500 (EST) |
branch: elpa/rainbow-delimiters
commit 402a9e8e04208945bde5dac88894e764398b3b24
Author: Fanael Linithien <fanael4@gmail.com>
Commit: Fanael Linithien <fanael4@gmail.com>
Treat the ? as a quote character only when it starts a symbol.
This is so we're not confused by (foo?), which is a valid function call.
Fixes 'doesnt-highlight-escaped-delimiters' test failure.
---
rainbow-delimiters.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/rainbow-delimiters.el b/rainbow-delimiters.el
index 7bb17a2134..a81953eca9 100644
--- a/rainbow-delimiters.el
+++ b/rainbow-delimiters.el
@@ -201,7 +201,13 @@ The delimiter is not highlighted if it's a blacklisted
delimiter."
"Non-nil iff the character at LOC is escaped as per Emacs Lisp rules."
(or (and (eq (char-before loc) ?\?) ; e.g. ?) - deprecated, but people use it
(not (and (eq (char-before (1- loc)) ?\\) ; special case: ignore ?\?
- (eq (char-before (- loc 2)) ?\?))))
+ (eq (char-before (- loc 2)) ?\?)))
+ ;; Treat the ? as a quote character only when it starts a symbol, so
+ ;; we're not confused by (foo?), which is a valid function call.
+ (let ((inhibit-changing-match-data t))
+ (save-excursion
+ (goto-char (1- loc))
+ (looking-at "\\_<"))))
(and (eq (char-before loc) ?\\) ; escaped char, e.g. ?\) - not counted
(eq (char-before (1- loc)) ?\?))))
- [nongnu] elpa/rainbow-delimiters df63c842a3 131/188: Update the customization instructions., (continued)
- [nongnu] elpa/rainbow-delimiters df63c842a3 131/188: Update the customization instructions., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 845e681fae 135/188: Use lexical-binding., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters d723eb0a8c 134/188: In the C++ template syntax test, remove some text properties., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 039e9345c5 136/188: Document why there's no Emacs 24 requirement., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 115173b2eb 142/188: Rename README.markdown to README.md., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters e50e4787b4 144/188: Turn rainbow-delimiters-max-face-count into a defcustom., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 8b94fc0100 146/188: Make rainbow-delimiters-faces reachable from (customize-group 'faces)., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 82952aa34a 148/188: Test for blacklisting right before highlighting the delimiter., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters ef33129a0a 150/188: Treat byte compilation warnings as test suite failures., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters ab79aec8f8 153/188: Simplify the handling of escaped delimiters., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 402a9e8e04 152/188: Treat the ? as a quote character only when it starts a symbol.,
ELPA Syncer <=
- [nongnu] elpa/rainbow-delimiters a802a6c823 156/188: Refactor the code, no functional changes., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 4bac5ce118 158/188: Don't flush the syntax-ppss cache unless necessary., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 9d23157002 160/188: Simplify the way we determine whether to flush syntax-ppss cache., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters cc829473be 170/188: Deprecate rainbow-delimiters-delimiter-blacklist., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters a4005ac963 162/188: Remove more useless comments., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters e75a4b18e9 159/188: Remove unneeded with-no-warnings., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 153284f304 168/188: Fix a typo., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 27d21f278b 167/188: Rephrase the header line description., ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters a695c0f3b9 183/188: Use GitHub workflows for CI, ELPA Syncer, 2022/01/01
- [nongnu] elpa/rainbow-delimiters 9a644d9e42 178/188: Pass -y to apt-get install, ELPA Syncer, 2022/01/01