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

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

[nongnu] elpa/rainbow-delimiters 7b882c9489 138/188: Merge (let … (let*


From: ELPA Syncer
Subject: [nongnu] elpa/rainbow-delimiters 7b882c9489 138/188: Merge (let … (let* …)) => (let* …).
Date: Sat, 1 Jan 2022 00:58:59 -0500 (EST)

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

    Merge (let … (let* …)) => (let* …).
---
 rainbow-delimiters.el | 52 +++++++++++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/rainbow-delimiters.el b/rainbow-delimiters.el
index 526cbd90ca..8e18009cff 100644
--- a/rainbow-delimiters.el
+++ b/rainbow-delimiters.el
@@ -281,34 +281,34 @@ Returns t if char at loc meets one of the following 
conditions:
 Used by font-lock for dynamic highlighting."
   (setq rainbow-delimiters-escaped-char-predicate
         (cdr (assoc major-mode 
rainbow-delimiters-escaped-char-predicate-list)))
-  (let ((inhibit-point-motion-hooks t))
-    ;; Point can be anywhere in buffer; determine the nesting depth at point.
-    (let* ((last-ppss-pos (point))
-           (ppss (syntax-ppss))
-           ;; Ignore negative depths created by unmatched closing delimiters.
-           (depth (max 0 (nth 0 ppss))))
-      (while (re-search-forward rainbow-delimiters--delim-regex end t)
-        (let* ((delim-pos (match-beginning 0))
-               (delim-syntax (syntax-after delim-pos)))
-          (setq ppss (save-excursion
-                       (parse-partial-sexp last-ppss-pos delim-pos nil nil 
ppss)))
-          (setq last-ppss-pos delim-pos)
-          (unless (rainbow-delimiters--char-ineligible-p delim-pos ppss (car 
delim-syntax))
-            (if (= 4 (logand #xFFFF (car delim-syntax)))
-                (progn
-                  (setq depth (1+ depth))
-                  (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))))
+  (let* ((inhibit-point-motion-hooks t)
+         ;; Point can be anywhere in buffer; determine the nesting depth at 
point.
+         (last-ppss-pos (point))
+         (ppss (syntax-ppss))
+         ;; Ignore negative depths created by unmatched closing delimiters.
+         (depth (max 0 (nth 0 ppss))))
+    (while (re-search-forward rainbow-delimiters--delim-regex end t)
+      (let* ((delim-pos (match-beginning 0))
+             (delim-syntax (syntax-after delim-pos)))
+        (setq ppss (save-excursion
+                     (parse-partial-sexp last-ppss-pos delim-pos nil nil 
ppss)))
+        (setq last-ppss-pos delim-pos)
+        (unless (rainbow-delimiters--char-ineligible-p delim-pos ppss (car 
delim-syntax))
+          (if (= 4 (logand #xFFFF (car delim-syntax)))
+              (progn
+                (setq depth (1+ depth))
                 (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
-                ;; delimiter.
-                (setq depth (max 0 (1- 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 delim-pos
+                                               depth
+                                               (eq (cdr delim-syntax)
+                                                   matching-opening-delim))
+              ;; Don't let `depth' go negative, even if there's an unmatched
+              ;; delimiter.
+              (setq depth (max 0 (1- depth)))))))))
   ;; We already fontified the delimiters, tell font-lock there's nothing more
   ;; to do.
   nil)



reply via email to

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