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

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

[nongnu] elpa/rainbow-delimiters df383f86f7 074/188: Clean up comments a


From: ELPA Syncer
Subject: [nongnu] elpa/rainbow-delimiters df383f86f7 074/188: Clean up comments and whitespace.
Date: Sat, 1 Jan 2022 00:58:53 -0500 (EST)

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

    Clean up comments and whitespace.
---
 rainbow-delimiters.el | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/rainbow-delimiters.el b/rainbow-delimiters.el
index 704b29952a..99d0815f5e 100644
--- a/rainbow-delimiters.el
+++ b/rainbow-delimiters.el
@@ -173,7 +173,7 @@ Nil disables brace highlighting."
   "Face to highlight mismatched closing delimiters in."
   :group 'rainbow-delimiters-faces)
 
-;; Faces for highlighting delimiters by nested level:
+;; Faces for highlighting delimiters by nesting level:
 (defface rainbow-delimiters-depth-1-face
   '((((background light)) (:foreground "#707183"))
     (((background dark)) (:foreground "grey55")))
@@ -230,7 +230,7 @@ Nil disables brace highlighting."
   :group 'rainbow-delimiters-faces)
 
 ;;; Faces 10+:
-;; NOTE: Currently unused. Additional faces for depths 9+ can be added on 
request.
+;; NOTE: Currently unused. Additional faces for depths 10+ can be added on 
request.
 
 (defconst rainbow-delimiters-max-face-count 9
   "Number of faces defined for highlighting delimiter levels.
@@ -347,7 +347,8 @@ the other rainbow-delimiters specific syntax tables based 
on the current
 The syntax table is constructed by the function
 `rainbow-delimiters-make-syntax-table'.")
 
-;; syntax-table: used with syntax-ppss for determining current depth.
+;; Syntax table: used with `rainbow-delimiters-syntax-ppss' for determining
+;; current depth.
 (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)))
@@ -364,8 +365,7 @@ The syntax table is constructed by the function
   (let ((depth (car (rainbow-delimiters-syntax-ppss loc))))
     (if (>= depth 0)
         depth
-      0))) ; ignore negative depths created by unmatched closing parens.
-
+      0))) ; Ignore negative depths created by unmatched closing parens.
 
 ;;; Text properties
 
@@ -423,7 +423,6 @@ Returns t if char at loc meets one of the following 
conditions:
    (and rainbow-delimiters-escaped-char-predicate
         (funcall rainbow-delimiters-escaped-char-predicate loc))))
 
-
 (defsubst rainbow-delimiters-apply-color (delim depth loc match)
   "Apply color for DEPTH to DELIM at LOC following user settings.
 
@@ -439,10 +438,8 @@ MATCH is nil iff it's a mismatched closing delimiter."
                                             depth
                                             match)))
 
-
 ;;; Font-Lock functionality
 
-;; Used to skip delimiter-by-delimiter `rainbow-delimiters-propertize'.
 (defconst rainbow-delimiters-delim-regex "\\(\(\\|\)\\|\\[\\|\\]\\|\{\\|\}\\)"
   "Regex matching all opening and closing delimiters the mode highlights.")
 
@@ -461,7 +458,7 @@ DELIMITER is the closing delimiter.
 OPENING is the corresponding opening delimiter.
 TYPE is the delimiter type string for `rainbow-delimiters-apply-color'.")
 
-;; main function called by font-lock:
+;; Main function called by font-lock.
 (defun rainbow-delimiters-propertize (end)
   "Highlight delimiters in region between point and END.
 
@@ -499,7 +496,8 @@ Used by font-lock for dynamic highlighting."
                                                          
matching-opening-delim))
                       (setq depth (or (and (<= depth 0) 0) ; unmatched delim
                                       (1- depth))))))))
-            ;; move past delimiter so re-search-forward doesn't pick it up 
again
+            ;; Move past delimiter so re-search-forward doesn't pick it up
+            ;; again.
             (forward-char))))))
   ;; We already fontified the delimiters, tell font-lock there's nothing more
   ;; to do.
@@ -509,7 +507,8 @@ Used by font-lock for dynamic highlighting."
 
 ;; NB: no face defined here because we apply the faces ourselves instead of
 ;; leaving that to font-lock.
-(defconst rainbow-delimiters-keywords '(rainbow-delimiters-propertize))
+(defconst rainbow-delimiters-keywords
+  '(rainbow-delimiters-propertize))
 
 (defun rainbow-delimiters-mode-turn-on ()
   "Set up `rainbow-delimiters-mode'."
@@ -556,5 +555,4 @@ Used by font-lock for dynamic highlighting."
   rainbow-delimiters-mode rainbow-delimiters-mode-enable)
 
 (provide 'rainbow-delimiters)
-
 ;;; rainbow-delimiters.el ends here



reply via email to

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