[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 04f6f73 185/271: Documentation.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 04f6f73 185/271: Documentation. |
Date: |
Thu, 05 Feb 2015 18:31:03 +0000 |
branch: master
commit 04f6f73735367c81075f67f774e0b40f306b9d7a
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Documentation.
---
context-coloring.el | 30 ++++++++++++++++++++----------
1 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index 16eb1f2..830fd98 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -59,7 +59,7 @@ Supported modes: `js-mode', `js3-mode'"
:group 'context-coloring)
(defcustom context-coloring-js-block-scopes nil
- "If non-nil, add block scopes to the scope hierarchy.
+ "If non-nil, also color block scopes in the scope hierarchy in JavaScript.
The block-scope-inducing `let' and `const' are introduced in
ES6. If you are writing ES6 code, enable this; otherwise, don't.
@@ -74,15 +74,17 @@ Supported modes: `js2-mode'"
"Reference to this buffer (for timers).")
(defvar-local context-coloring-scopifier-process nil
- "Only allow a single scopifier process to run at a time. This
-is a reference to that one process.")
+ "Reference to the single scopifier process that can be
+ running.")
(defvar-local context-coloring-colorize-idle-timer nil
- "Reference to currently-running idle timer.")
+ "Reference to the currently-running idle timer.")
(defvar-local context-coloring-changed nil
"Indication that the buffer has changed recently, which would
-imply that it should be colorized again.")
+imply that it should be colorized again by
+`context-coloring-colorize-idle-timer' if that timer is being
+used.")
;;; Faces
@@ -175,7 +177,7 @@ imply that it should be colorized again.")
:group 'context-coloring-faces)
(defcustom context-coloring-face-count 7
- "Number of faces defined for highlighting delimiter levels.
+ "Number of faces defined for highlighting levels.
Determines level at which to cycle through faces again."
:group 'context-coloring)
@@ -204,11 +206,14 @@ For example: \"context-coloring-level-1-face\"."
(defun context-coloring-uncolorize-buffer ()
"Clears all coloring in the current buffer."
- (remove-text-properties (point-min) (point-max) `(face nil rear-nonsticky
nil)))
+ (remove-text-properties
+ (point-min)
+ (point-max)
+ `(face nil rear-nonsticky nil)))
(defsubst context-coloring-colorize-region (start end level)
- "Colorizes characters from 1-indexed START (inclusive) to END
-\(exclusive) with the face corresponding to LEVEL."
+ "Colorizes characters from the 1-indexed START (inclusive) to
+END (exclusive) with the face corresponding to LEVEL."
(add-text-properties
start
end
@@ -236,6 +241,8 @@ For example: \"context-coloring-level-1-face\"."
;; Adapted from js2-refactor.el/js2r-vars.el.
;; FIXME: This fails if there is whitespace between the name and the colon.
(defsubst context-coloring-js2-local-name-node-p (node)
+ "Determines if NODE is a js2-name-node representing a local
+variable."
(and (js2-name-node-p node)
(let ((start (js2-node-abs-pos node)))
(and
@@ -250,6 +257,7 @@ For example: \"context-coloring-level-1-face\"."
start)))))))
(defsubst context-coloring-js2-colorize-node (node level)
+ "Colors NODE with the color for LEVEL."
(let ((start (js2-node-abs-pos node)))
(context-coloring-colorize-region
start
@@ -257,6 +265,8 @@ For example: \"context-coloring-level-1-face\"."
level)))
(defun context-coloring-js2-colorize ()
+ "Colorizes the current buffer using the abstract syntax tree
+generated by js2-mode."
(with-silent-modifications
(js2-visit-ast
js2-mode-ast
@@ -282,7 +292,7 @@ For example: \"context-coloring-level-1-face\"."
t)))))
-;;; Shell command copification / colorization
+;;; Shell command scopification / colorization
(defun context-coloring-apply-tokens (tokens)
"Processes a vector of TOKENS to apply context-based coloring
- [elpa] master 27db37a 202/271: Use a hash table as a scope level fast track., (continued)
- [elpa] master 27db37a 202/271: Use a hash table as a scope level fast track., Jackson Ray Hamilton, 2015/02/05
- [elpa] master f3ab262 246/271: Merge branch 'develop', Jackson Ray Hamilton, 2015/02/05
- [elpa] master 73c82f9 234/271: Merge branch 'feature/set-colors' into develop, Jackson Ray Hamilton, 2015/02/05
- [elpa] master 1c0155f 203/271: Don't color name nodes in their own scope., Jackson Ray Hamilton, 2015/02/05
- [elpa] master b325b91 250/271: Add current directory to load path for compilation., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 6755fdb 194/271: Pass test for key names., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 941070c 257/271: Add `make deps`., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 6ce2b63 184/271: Bump required js2-mode version., Jackson Ray Hamilton, 2015/02/05
- [elpa] master d1cb93b 241/271: Merge branch 'feature/dispatch' into develop, Jackson Ray Hamilton, 2015/02/05
- [elpa] master e05f044 191/271: Update js2-mode., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 04f6f73 185/271: Documentation.,
Jackson Ray Hamilton <=
- [elpa] master ed2c33d 121/271: Merge branch 'feature/color-schemer' into develop, Jackson Ray Hamilton, 2015/02/05
- [elpa] master 196a6ed 209/271: Whoops., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 887f4c7 215/271: Merge branch 'master' into develop, Jackson Ray Hamilton, 2015/02/05
- [elpa] master 6706bc2 218/271: Merge branch 'develop', Jackson Ray Hamilton, 2015/02/05
- [elpa] master d813892 115/271: Add color-schemer utility., Jackson Ray Hamilton, 2015/02/05
- [elpa] master fadacd1 180/271: Add badge., Jackson Ray Hamilton, 2015/02/05
- [elpa] master cae3b72 240/271: Document new dispatch API., Jackson Ray Hamilton, 2015/02/05
- [elpa] master fedf885 269/271: Add note to readme about --version., Jackson Ray Hamilton, 2015/02/05
- [elpa] master d1715b2 177/271: Remove .gitignore entry., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 6e5e95a 211/271: Pass key-value pair test., Jackson Ray Hamilton, 2015/02/05