[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master f9eb4a1 080/271: Revert "Use alist of faces."
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master f9eb4a1 080/271: Revert "Use alist of faces." |
Date: |
Thu, 05 Feb 2015 18:29:55 +0000 |
branch: master
commit f9eb4a1884168e8968fe8a19ff1401e66e210169
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Revert "Use alist of faces."
This reverts commit 49f5e3e39e698e57146982602affe629376a5d5e.
---
context-coloring.el | 44 ++++++++++++++++----------------------------
1 files changed, 16 insertions(+), 28 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index b3671f2..8be5ff3 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -134,37 +134,25 @@ Determines depth at which to cycle through faces again.")
;;; Face functions
-(defconst context-coloring-faces
- '((0 . ((0 . context-coloring-depth-0-face)
- (1 . context-coloring-depth-1-face)
- (2 . context-coloring-depth-2-face)
- (3 . context-coloring-depth-3-face)
- (4 . context-coloring-depth-4-face)
- (5 . context-coloring-depth-5-face)
- (6 . context-coloring-depth-6-face)))
- (1 . ((0 . context-coloring-depth-0-bold-face)
- (1 . context-coloring-depth-1-bold-face)
- (2 . context-coloring-depth-2-bold-face)
- (3 . context-coloring-depth-3-bold-face)
- (4 . context-coloring-depth-4-bold-face)
- (5 . context-coloring-depth-5-bold-face)
- (6 . context-coloring-depth-6-bold-face)))
- (2 . ((-1 . context-coloring-depth--1-italic-face))))
- "Alist of faces for fast lookup.")
-
(defun context-coloring-level-face (depth style)
"Return face-name for DEPTH and STYLE as a string
\"context-coloring-depth-DEPTH-face\".
For example: \"context-coloring-depth-1-face\"."
- (cdr (assq (or
- ;; Has a face directly mapping to it.
- (and (< depth context-coloring-face-count)
- depth)
- ;; After the number of available faces are used up, pretend the
0th
- ;; face doesn't exist.
- (+ 1
- (mod (- depth 1)
- (- context-coloring-face-count 1))))
- (cdr (assq style context-coloring-faces)))))
+ (intern-soft
+ (concat "context-coloring-depth-"
+ (number-to-string
+ (or
+ ;; Has a face directly mapping to it.
+ (and (< depth context-coloring-face-count)
+ depth)
+ ;; After the number of available faces are used up, pretend the
0th
+ ;; face doesn't exist.
+ (+ 1
+ (mod (- depth 1)
+ (- context-coloring-face-count 1)))))
+ (cond ((= 1 style) "-bold")
+ ((= 2 style) "-italic")
+ (t ""))
+ "-face")))
;;; Customizable variables
- [elpa] master 67637bf 072/271: Update test fixture., (continued)
- [elpa] master 67637bf 072/271: Update test fixture., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 65e4763 065/271: Just push to a single tokens array., Jackson Ray Hamilton, 2015/02/05
- [elpa] master cb8b1f2 066/271: Add light color scheme., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 7a49f9f 067/271: Make comments italic., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 07fe42c 078/271: Vconcat., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 28667b8 075/271: Move microoptimized scopifier into the limelight., Jackson Ray Hamilton, 2015/02/05
- [elpa] master c1f9f11 063/271: Switch to concat., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 183ac4e 081/271: Add emacs benchmark., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 59b1c99 074/271: Documentation and cleanup., Jackson Ray Hamilton, 2015/02/05
- [elpa] master c81c3fd 068/271: Make declarations bold., Jackson Ray Hamilton, 2015/02/05
- [elpa] master f9eb4a1 080/271: Revert "Use alist of faces.",
Jackson Ray Hamilton <=
- [elpa] master ea3fd79 071/271: Make implicit global variables bold., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 1039a74 073/271: Update microoptimized version., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 18e35dd 069/271: Shift token properties., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 49f5e3e 079/271: Use alist of faces., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 8615688 089/271: Create tests., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 10d7726 077/271: Use custom JSON parser., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 099f434 082/271: Add optimizations for byte-compilation., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 0bfdbcd 085/271: Remove naive timers., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 4874e1e 086/271: Improve documentation and Makefile., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 43d2ca0 090/271: Remove unused monad., Jackson Ray Hamilton, 2015/02/05