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

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

[elpa] master 8367e19 18/26: Rename `level-face' functions.


From: Jackson Ray Hamilton
Subject: [elpa] master 8367e19 18/26: Rename `level-face' functions.
Date: Sat, 14 Feb 2015 08:19:38 +0000

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

    Rename `level-face' functions.
---
 context-coloring.el           |   20 ++++++++++----------
 test/context-coloring-test.el |    2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/context-coloring.el b/context-coloring.el
index 8b056a5..6c71180 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -110,16 +110,16 @@ backgrounds."
 
 ;;; Face functions
 
-(defsubst context-coloring-face-symbol (level)
-  "Returns a symbol for a face with LEVEL."
+(defsubst context-coloring-level-face (level)
+  "Return the symbol for a face with LEVEL."
   ;; `concat' is faster than `format' here.
-  (intern-soft (concat "context-coloring-level-"
-                       (number-to-string level)
-                       "-face")))
+  (intern-soft
+   (concat "context-coloring-level-" (number-to-string level) "-face")))
 
-(defsubst context-coloring-level-face (level)
-  "Returns the face name for LEVEL."
-  (context-coloring-face-symbol (min level context-coloring-maximum-face)))
+(defsubst context-coloring-bounded-level-face (level)
+  "Return the symbol for a face with LEVEL, bounded by
+`context-coloring-maximum-face'."
+  (context-coloring-level-face (min level context-coloring-maximum-face)))
 
 
 ;;; Colorization utilities
@@ -130,7 +130,7 @@ END (exclusive) with the face corresponding to LEVEL."
   (add-text-properties
    start
    end
-   `(face ,(context-coloring-level-face level))))
+   `(face ,(context-coloring-bounded-level-face level))))
 
 (defcustom context-coloring-comments-and-strings t
   "If non-nil, also color comments and strings using `font-lock'."
@@ -550,7 +550,7 @@ which must already exist and which *should* already be 
enabled."
      (mapcar
       (lambda (color)
         (setq level (+ level 1))
-        `(,(context-coloring-face-symbol level) ((t (:foreground ,color)))))
+        `(,(context-coloring-level-face level) ((t (:foreground ,color)))))
       colors))))
 
 (defun context-coloring-define-theme (theme &rest properties)
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index 61e24b1..0e6e03f 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -251,7 +251,7 @@ EXPECTED-FACE."
 (defun context-coloring-test-assert-face (level foreground &optional negate)
   "Assert that a face for LEVEL exists and that its `:foreground'
 is FOREGROUND."
-  (let* ((face (context-coloring-face-symbol level))
+  (let* ((face (context-coloring-level-face level))
          actual-foreground)
     (when (not (or negate
                    face))



reply via email to

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