Comments (3)
Because Emacs themes can run arbitrary code, I see no major obstacles to wrapping the existing nano theme in a file with (deftheme).
A concern would be to preserve the ability to have the theme code split between several files, as opposed to a single big one. I took a quick glance at the Custom Themes manual section, I have a feeling custom-load-path and the usual load-path have some un(?)documented intertwining.
Right now, faces are defined programmatically in nano-faces.el
and derived from a set of base colors nano-base-colors.el
. The
nano "faces" are then applies to a whole range of other faces, in nano-theme.el
.
I proposed #18 to move the face derivation code into custom get/set functions, but I wasn't able to formulate convincing arguments to answer Nicolas' reticence. I don't think it's actually blocking the introduction of a (deftheme)
.
Now, if your goal is simply to change the base colors, feel free to load any theme before you load nano.el, and nano should pick them up.
from nano-emacs.
I solved this like this
(defvar nano-theme-light-var t)
(defun nano-change-theme-dark ()
(interactive)
(nano-theme-set-dark)
(nano-faces)
(nano-theme))
(defun nano-change-theme-light ()
(interactive)
(nano-theme-set-light)
(nano-faces)
(nano-theme))
(defun nano-change-theme ()
(interactive)
(if nano-theme-light-var (nano-change-theme-dark) (nano-change-theme-light))
(setq nano-theme-light-var (not nano-theme-light-var)))
from nano-emacs.
Actually, you could even rename your nano-change-theme
into nano-toggle-theme
. Could you make a PR?
from nano-emacs.
Related Issues (20)
- Contrast difference for agenda tasks that are overdue and scheduled today HOT 13
- [Bug] Error "Invalid face" bookmark-menu-heading - causes ivy minibuffer on some commands to throw error (+ other packages) HOT 4
- [Bug] Org-mode headings in source code blocks override indentation and formatting from src code block HOT 4
- [Feature Request] Ability to change code syntax highlighting theme inside nano HOT 1
- Changing the default to Nano Dark? HOT 8
- Hide nano-modeline HOT 2
- Nano Writer Mode HOT 1
- frame/windows layout change when opening minibuffer
- Different `display-buffer` behaviour HOT 1
- nano-mu4e updates for newer mu? HOT 1
- No bookmark-menu-heading in Emacs 29.0.91 HOT 4
- ELPA version of nano-modeline is missing deps (nano-faces?) HOT 10
- We eagerly await evil-mode support!
- nano-modeline breaks on html files HOT 3
- Writer mode : add a custom to define the default font family HOT 2
- Wrong number of arguments HOT 2
- cursor stays visible in first window when switching to the second window HOT 2
- Add custom variables for optional packages HOT 1
- Weird emacs freezing with nano-modeline.el HOT 2
- (^^)(^^)(^^)(^^)(^^) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nano-emacs.