emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rainbow-delimiters a37d19b415 082/188: Add a comment expla


From: ELPA Syncer
Subject: [nongnu] elpa/rainbow-delimiters a37d19b415 082/188: Add a comment explaining the previous change.
Date: Sat, 1 Jan 2022 00:58:54 -0500 (EST)

branch: elpa/rainbow-delimiters
commit a37d19b4159f9db1f2f16d9f0438e23de762e039
Author: Fanael Linithien <fanael4@gmail.com>
Commit: Fanael Linithien <fanael4@gmail.com>

    Add a comment explaining the previous change.
---
 rainbow-delimiters.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rainbow-delimiters.el b/rainbow-delimiters.el
index 064cae3595..5685fe15dd 100644
--- a/rainbow-delimiters.el
+++ b/rainbow-delimiters.el
@@ -362,6 +362,10 @@ The syntax table is constructed by the function
 (defun rainbow-delimiters-make-syntax-table (syntax-table)
   "Inherit SYNTAX-TABLE and add delimiters intended to be highlighted by mode."
   (let ((table (copy-syntax-table syntax-table)))
+    ;; Modify the entries only if the characters are not recognized as
+    ;; delimiters. This ensures that if the characters can be a part of
+    ;; multicharacter comment delimiter (e.g. {- -} in Haskell), we don't
+    ;; suddenly stop recognizing them as comments.
     (when (/= ?\( (char-syntax ?\())
       (modify-syntax-entry ?\( "()" table))
     (when (/= ?\( (char-syntax ?\[))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]