[Top][All Lists]

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

[elpa] master cda491a 17/31: Long lines.

From: Jackson Ray Hamilton
Subject: [elpa] master cda491a 17/31: Long lines.
Date: Mon, 09 Feb 2015 01:09:35 +0000

branch: master
commit cda491ae4d02914f95ffe3d4cabb89566b19f32d
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>

    Long lines.
 context-coloring.el           |   23 +++++++++++++++--------
 test/context-coloring-test.el |   18 ++++++++++++------
 2 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/context-coloring.el b/context-coloring.el
index c58cf67..054cdbc 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -290,7 +290,8 @@ element."
 (defun context-coloring-parse-array (input)
   "Specialized JSON parser for a flat array of numbers."
-  (vconcat (mapcar 'string-to-number (split-string (substring input 1 -1) 
+  (vconcat
+   (mapcar 'string-to-number (split-string (substring input 1 -1) ","))))
 (defun context-coloring-kill-scopifier ()
   "Kills the currently-running scopifier process for this
@@ -337,8 +338,11 @@ Invokes CALLBACK when complete."
            (if callback (funcall callback)))))))
   ;; Give the process its input so it can begin.
-  (process-send-region context-coloring-scopifier-process (point-min) 
-  (process-send-eof context-coloring-scopifier-process))
+  (process-send-region
+   context-coloring-scopifier-process
+   (point-min) (point-max))
+  (process-send-eof
+   context-coloring-scopifier-process))
 ;;; Dispatch
@@ -485,7 +489,8 @@ would be redundant."
   "Regular expression for extracting a level from a face.")
-(defvar context-coloring-originally-set-theme-hash-table (make-hash-table 
:test 'eq)
+(defvar context-coloring-originally-set-theme-hash-table
+  (make-hash-table :test 'eq)
   "Cache of custom themes who originally set their own
   `context-coloring-level-N-face' faces.")
@@ -660,9 +665,9 @@ THEME."
 (defadvice enable-theme (after context-coloring-enable-theme (theme) activate)
   "Enable colors for context themes just-in-time.  We can't set
 faces for custom themes that might not exist yet."
-  (when (and (not (eq theme 'user))          ; Called internally by 
+  (when (and (not (eq theme 'user))  ; Called internally by `enable-theme'.
              (context-coloring-theme-p theme)
-             (custom-theme-p theme))         ; Guard against non-existent 
+             (custom-theme-p theme)) ; Guard against non-existent themes.
     (context-coloring-enable-theme theme)))
@@ -760,8 +765,10 @@ faces for custom themes that might not exist yet."
         (when context-coloring-colorize-idle-timer
           (cancel-timer context-coloring-colorize-idle-timer))
-        (remove-hook 'js2-post-parse-callbacks 'context-coloring-colorize t)
-        (remove-hook 'after-change-functions 'context-coloring-change-function 
+        (remove-hook
+         'js2-post-parse-callbacks 'context-coloring-colorize t)
+        (remove-hook
+         'after-change-functions 'context-coloring-change-function t)
         (jit-lock-mode t))
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index d7fd714..a24a60b 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -71,7 +71,8 @@ is done."
               (kill-buffer temp-buffer))
          (set-buffer previous-buffer))))))
-(defun context-coloring-test-with-fixture-async (fixture callback &optional 
+(defun context-coloring-test-with-fixture-async
+    (fixture callback &optional setup)
   "Evaluate CALLBACK in a temporary buffer with the relative
 FIXTURE.  A teardown callback is passed to CALLBACK for it to
 invoke when it is done.  An optional SETUP callback can be passed
@@ -120,7 +121,8 @@ instantiated in SETUP."
   (let ((test-name (intern (format "context-coloring-test-js-mode-%s" name)))
         (fixture (format "./fixtures/%s.js" name))
-        (function-name (intern-soft (format "context-coloring-test-js-%s" 
+        (function-name (intern-soft
+                        (format "context-coloring-test-js-%s" name))))
     `(ert-deftest-async ,test-name (done)
@@ -134,7 +136,8 @@ format."
     "Define a test for `js2-mode' in the typical format."
   (let ((test-name (intern (format "context-coloring-test-js2-mode-%s" name)))
         (fixture (format "./fixtures/%s.js" name))
-        (function-name (intern-soft (format "context-coloring-test-js-%s" 
+        (function-name (intern-soft
+                        (format "context-coloring-test-js-%s" name))))
     `(ert-deftest ,test-name ()
@@ -310,7 +313,8 @@ is FOREGROUND."
     (setq context-coloring-test-theme-index
           (+ context-coloring-test-theme-index 1))))
-(defun context-coloring-test-assert-theme-originally-set-p (settings &optional 
+(defun context-coloring-test-assert-theme-originally-set-p
+    (settings &optional negate)
   "Assert that `context-coloring-theme-originally-set-p' returns
 t for a theme with SETTINGS (or the inverse if NEGATE is
@@ -328,7 +332,8 @@ non-nil)."
 (defun context-coloring-test-assert-not-theme-originally-set-p (&rest 
   "Assert that `context-coloring-theme-originally-set-p' does not
 return t for a theme with SETTINGS."
-  (apply 'context-coloring-test-assert-theme-originally-set-p (append 
arguments '(t))))
+  (apply 'context-coloring-test-assert-theme-originally-set-p
+         (append arguments '(t))))
 (ert-deftest context-coloring-test-theme-originally-set-p ()
@@ -377,7 +382,8 @@ return t for a theme with SETTINGS."
 (defmacro context-coloring-test-deftest-define-theme (name &rest body)
   (declare (indent defun))
-  (let ((deftest-name (intern (format "context-coloring-test-define-theme-%s" 
+  (let ((deftest-name (intern
+                       (format "context-coloring-test-define-theme-%s" name))))
     `(ert-deftest ,deftest-name ()
        (context-coloring-test-kill-buffer "*Warnings*")
        (let ((theme (context-coloring-test-get-next-theme)))

reply via email to

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