[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/autothemer c5901014eb: Update readme.md
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/autothemer c5901014eb: Update readme.md |
Date: |
Wed, 17 Aug 2022 07:58:08 -0400 (EDT) |
branch: elpa/autothemer
commit c5901014ebd361322e479c26a311d9bb6918cd23
Author: Jason Milkins <jasonm23@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Update readme.md
---
readme.md | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/readme.md b/readme.md
index e03274a888..9beb26aa00 100644
--- a/readme.md
+++ b/readme.md
@@ -11,7 +11,7 @@ simplified face specifications to be applied to Emacs.
Take a look at the example below.
-```elisp
+```lisp
(autothemer-deftheme example-name "Autothemer example..."
;; Specify the color classes used by the theme
@@ -55,7 +55,7 @@ Autothemer solves most of the problems that a theme developer
would face.
By defining a simple set of color class rules we can remove swathes of
repetitive face specs. Looking again at the example above.
-```
+```lisp
(((class color) (min-colors #xFFFFFF))
((class color) (min-colors #xFF)))
```
@@ -66,19 +66,19 @@ We can setup as many columns as we'd like to support,
here's a few more examples
For a two color display:
-```
+```lisp
((class color) (monochrome)))
```
For a light background 24bit
-```
+```lisp
((class color) (min-colors #xFFFFFF) (background light))
```
For a dark background 24bit
-```
+```lisp
((class color) (min-colors #xFFFFFF) (background dark))
```
@@ -92,7 +92,7 @@ You can set color values as nil and the first color to the
left will be used.
For example, if we have three display classes defined, 256, 24bit, 16 color:
-```
+```lisp
((((class color) (min-colors #xFF))
((class color) (min-colors #xFFFFFF))
((class color) (min-colors 16)))
@@ -113,7 +113,7 @@ Autothemer's primary purpose is to reduce this down to a
minimum.
As we can see in the example above face specs now look like this:
-```
+```lisp
;; specifications for Emacs faces.
((button (:underline t :weight 'bold :foreground example-yellow))
(error (:foreground example-red)))
@@ -168,7 +168,7 @@ judgement and taste!
While autothemer doesn't export the defined color variables for external
use, you can define simple advice on `autothemer-deftheme` to do so:
-```emacs-lisp
+```lisp
(define-advice autothemer-deftheme (:before (_ _ palette &rest _) defcolors)
(mapcar (lambda (e)
(setf (symbol-value (car e))
@@ -179,7 +179,7 @@ If you place the advice definition before the
autothemer-generated theme
is loaded, e.g. `my-red` from the example above will be available as a
variable that can be used in other parts of your emacs configuration.
-## TVA - Creating theme variance.
+# TVA
Theme Variance Architecture is the pattern used in the Gruvbox theme for
creating theme variants.
@@ -191,22 +191,22 @@ TVA requires package, themes and variants to be named
using a specific conventio
### Convert an autothemer based theme to the TVA style.
-For example, let's say we've created a standalone theme called
+For example, let's say we've created a standalone theme called:
```
foo
```
-Following `package.el` and Emacs convention we'd name the theme Emac lisp file:
+Given the `package.el` and Emacs convention we will have named the Emacs lisp
file:
```
foo-theme.el
```
-To create some variants, we'd need to create a new lisp macro for `foo` theme
family.
+To prepare to add variants, we'll create a macro for the `foo` theme family.
It'll look after setting all the face specs in emacs, and allow us to define
our variant palette elsewhere. **As long as the same palette variable names
are used, we should be ok.**
[Let's take a look at how this
-is done in
Gruvbox](https://github.com/greduan/emacs-theme-gruvbox/blob/3929f29674ac1cb59efaa017e3c534e0d8d72a2d/gruvbox.el#L88)
+was done in
Gruvbox](https://github.com/greduan/emacs-theme-gruvbox/blob/3929f29674ac1cb59efaa017e3c534e0d8d72a2d/gruvbox.el#L88)
For our `foo-theme` we'd do the following.
@@ -228,6 +228,7 @@ For our `foo-theme` we'd do the following.
```
((face (specs...)))
```
+ For Gruvbox's development, [this commit captures the face specs
move.](https://github.com/greduan/emacs-theme-gruvbox/commit/250df251d0972aecd259144ad1ad3daf33c97cb2).
Although we'd already created variants at that point, and had a lot of code
duplication. (TVA is the way we've DRYed up this duplication, giving
`gruvbox.el` the status of single point where we add new mode support.)
- Modify `foo-theme.el`
- use `deftheme-foo` instead of `autothemer-deftheme`
- Replace `(require 'autothemer)` with `(require 'foo)`
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/autothemer c5901014eb: Update readme.md,
ELPA Syncer <=