Commit graph

1189 commits

Author SHA1 Message Date
Protesilaos Stavrou 9cbeccd312
Add WCAG formula and contrast checker function
Special thanks to Omar Antolín Camarena!
2020-11-21 22:28:39 +02:00
Protesilaos Stavrou 5eae487962
Minor update to some function docstrings 2020-11-21 22:28:10 +02:00
Protesilaos Stavrou 8cc56dc6de
Add ':version' to all defcustom declarations 2020-11-21 17:58:50 +02:00
Protesilaos Stavrou 85f21e3d3b
Pass no-confirm argument to 'load-theme'
This ultimately affects 'modus-themes-toggle'.
2020-11-21 16:06:02 +02:00
Protesilaos Stavrou 21bf232004
Update file descriptions and documentation
This is useful for MELPA and possibly other packaging systems.
2020-11-21 09:41:25 +02:00
Protesilaos Stavrou c5a771b503
Make face specs a defconst instead of defvar 2020-11-21 09:29:48 +02:00
Protesilaos Stavrou a2a3f24c83
Decouple faces from variables
This fixes the faulty macro expansion of nesting the call to
'custom-theme-set-variables' inside 'custom-theme-set-faces'.  Actually
you could not catch the error just by using the theme because it
worked as expected...

Also makes the code easier to understand, as it clearly separates faces
from variables (defface VS defvar or defcustom).
2020-11-20 14:35:49 +02:00
Protesilaos Stavrou 4c330b73d3
Do not scope faces based on their Emacs version
There is no need for calls like '(when (>= emacs-major-version 27)'
because unknown faces are simply ignored (e.g. all the faces defined by
the themes whose packages you have not installed).

Also, this have the benefit of greatly simplifying code and its
maintenance.
2020-11-20 14:32:41 +02:00
Protesilaos Stavrou b225f994fd
Tweak homoglyph and ibuffer-locked-buffer faces 2020-11-20 14:31:03 +02:00
Protesilaos Stavrou b4a6a324a7
Minor tweaks to latex faces 2020-11-20 14:15:56 +02:00
Protesilaos Stavrou e9cf164bbe
Minor indentation adjustments due to 2f6de491b 2020-11-20 11:24:09 +02:00
Protesilaos Stavrou 2f6de491b3
Use double hyphen for all internal functions
This is just a matter of conforming with Elisp packaging conventions.
2020-11-20 11:22:55 +02:00
Protesilaos Stavrou 7c40e05e01
Make geiser consistent with base faces
This allows it to benefit from customisation options such as
'modus-themes-syntax', 'modus-themes-prompts', 'modus-themes-links'.
2020-11-20 09:55:47 +02:00
Protesilaos Stavrou 9fdd5cf45d
Make nxml-mode consistent with base faces
This allows it to benefit from the 'modus-themes-syntax' option.
2020-11-20 09:55:47 +02:00
Protesilaos Stavrou b1327ed568
Make tuareg faces consistent with base faces
This allows it to benefit from the 'modus-themes-syntax' option.
2020-11-20 09:55:47 +02:00
Protesilaos Stavrou 84fe46e746
Make xah-elisp-mode consistent with base faces
This allows it to benefit from the 'modus-themes-syntax' option.
2020-11-20 09:55:47 +02:00
Protesilaos Stavrou 565e4810c4
Make web-mode faces consistent with base faces
This allows it to benefit from the 'modus-themes-syntax' option.
2020-11-20 09:55:47 +02:00
Protesilaos Stavrou 7e00075464
Add support for Macrostep 2020-11-19 10:52:11 +02:00
Protesilaos Stavrou 30f4c36306
Expand support for more Semantic faces 2020-11-19 07:24:43 +02:00
Protesilaos Stavrou 1e76ff8c9f
Make re-builder faces less intrusive 2020-11-18 18:05:15 +02:00
Protesilaos Stavrou 367a695c50
Tweak log-view-commit-body (amend 704aa9500) 2020-11-18 17:48:29 +02:00
Protesilaos Stavrou 704aa95003
Add support for Emacs 28 log-view-commit-body 2020-11-18 16:33:29 +02:00
Protesilaos Stavrou de8cd0e3a8
Add support for two Emacs 28 faces 2020-11-18 16:26:09 +02:00
Protesilaos Stavrou 783a8e5b5f
Fix hard-coded name for variables and other specs 2020-11-18 16:09:53 +02:00
Protesilaos Stavrou 00e7e24ca2
Use consistent colours for terminals 2020-11-18 08:09:26 +02:00
Protesilaos Stavrou cfef0a61fd
Reformat GPL notice in each file's header 2020-11-17 17:57:58 +02:00
Protesilaos Stavrou 20b011e25d
Avoid duplication of commentary 2020-11-17 17:55:26 +02:00
Protesilaos Stavrou 7d1fb78c6a
Add comment headers for core and main code files
Discussion: https://gitlab.com/protesilaos/modus-themes/-/issues/119
2020-11-17 17:11:28 +02:00
Protesilaos Stavrou 015fc5238b
Reword a comment 2020-11-17 14:32:34 +02:00
Protesilaos Stavrou 022efb71c2
Append "-fg" to all nuanced foregrounds 2020-11-17 14:31:05 +02:00
Protesilaos Stavrou 8bafa467d5
Restructure palette alists 2020-11-17 12:25:00 +02:00
Protesilaos Stavrou a208b02020
Declare obsolete options and clean up section
Discussion: https://gitlab.com/protesilaos/modus-themes/-/issues/119
2020-11-17 10:26:40 +02:00
Protesilaos Stavrou 433fbb204b
Re-indent file 2020-11-16 18:25:51 +02:00
Protesilaos Stavrou 1f1f6fee0f
Add 'modus-themes-toggle' and extras
Discussion in the Modus themes' main repo:
https://gitlab.com/protesilaos/modus-themes/-/issues/119
2020-11-15 17:44:24 +02:00
Protesilaos Stavrou 0a36b11657
Fix deprecated symbol names 2020-11-15 15:12:38 +02:00
Protesilaos Stavrou 3f97a3f153
Add utilities for DIY users
Basically this defines the 'modus-themes-color' function that lets you
retrieve the colour value assigned to KEY.  The key is found in the
association list that contains each theme's colour palette.

Example for how to use this:

    (set-face-attribute 'cursor nil :background (modus-themes-color 'blue))

Ongoing discussion in the Modus themes' main repo:
https://gitlab.com/protesilaos/modus-themes/-/issues/119
2020-11-15 13:58:57 +02:00
Protesilaos Stavrou e00a59a2c8
Add initial version of unified customisations
For a detailed discussion see this issue in the main Modus themes
repository: https://gitlab.com/protesilaos/modus-themes/-/issues/119
2020-11-15 12:50:59 +02:00
Protesilaos Stavrou 5878251285
Expand palettes and render overrides obsolete
I have come to the realisation that we are facing a trade-off: either we
allow users to override the colour palette of each theme OR we let the
themes byte compile properly.  I am strongly in favour of the latter and
have thus rendered obsolete the relevant customisation option to
override the themes' colours.

Please note that this conclusion is predicated on the knowledge I have
accummulated thus far.  I may be wrong and I do not purport to be an
expert.  If someone can show me how to both byte compile the themes AND
offer a user-facing variable to override individual colours, then please
let me know---I am happy to follow your guidance.
2020-11-14 16:10:45 +02:00
Protesilaos Stavrou db56a5ecb2
Fix compilation and remove superfluous items 2020-11-14 15:48:46 +02:00
Renamed from modus-themes-faces.el (Browse further)