rougier / nano-emacs

GNU Emacs / N Λ N O - Emacs made simple
GNU General Public License v3.0
2.5k stars 191 forks source link

Fix minor bug in theme loading #132

Closed balakrishnanc closed 1 year ago

balakrishnanc commented 1 year ago

Currently, the files nano-theme-* are only required based on command-line flags (e.g., specifying -dark, for instance, requires nano-theme-dark). So one of the two nano-theme-* and its functions will remain unloaded. Now, when a user invokes nano-toggle-theme it will complain not knowing about the alternative nano-theme-set-* (i.e., if nano-theme-dark was loaded, then toggling does not know of nano-theme-set-light function.). This fix loads both themes (one commit changes the theme files to simply supply the functions, but not call them), but activates the appropriate theme based on command-line flags.

rougier commented 1 year ago

Good point, thanks.