summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2018-12-25 13:28:05 -0500
committerAmin Bandali <bandali@gnu.org>2018-12-25 13:28:05 -0500
commitb1c000ddf5477b97116f151a5a0c79f8969215a0 (patch)
tree5a1728e5e1a22735d7254fe333936f098a711491
parentbfc7cfa24284f0fff3ca84df31adf03a0a2d6771 (diff)
downloadconfigs-b1c000ddf5477b97116f151a5a0c79f8969215a0.tar.gz
configs-b1c000ddf5477b97116f151a5a0c79f8969215a0.tar.xz
configs-b1c000ddf5477b97116f151a5a0c79f8969215a0.zip
[emacs/org] add the org-mode font-lock-keywords only for dark theme
-rw-r--r--init.org21
1 files changed, 12 insertions, 9 deletions
diff --git a/init.org b/init.org
index 058d8ef..800af12 100644
--- a/init.org
+++ b/init.org
@@ -757,13 +757,6 @@ In short, my favourite way of life.
org-catch-invisible-edits 'show-and-error
org-log-done 'time)
(add-to-list 'org-structure-template-alist '("L" . "src emacs-lisp") t)
- (font-lock-add-keywords
- 'org-mode
- '(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)"
- (1 '(:foreground "#5a5b5a" :background "#292b2b") t) ; directive
- (3 '(:foreground "#81a2be" :background "#292b2b") t) ; kind
- (4 '(:foreground "#c5c8c6") t))) ; title
- t)
:bind (:map org-mode-map ("M-L" . org-insert-last-stored-link))
:hook ((org-mode . org-indent-mode)
(org-mode . auto-fill-mode)
@@ -1772,19 +1765,29 @@ Emacs package that displays available keybindings in popup
** theme helper functions
#+begin_src emacs-lisp
+(defvar a/org-mode-font-lock-keywords
+ '(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)"
+ (1 '(:foreground "#5a5b5a" :background "#292b2b") t) ; directive
+ (3 '(:foreground "#81a2be" :background "#292b2b") t) ; kind
+ (4 '(:foreground "#c5c8c6") t)))) ; title
+
(defun a/lights-on ()
"Enable my favourite light theme."
(interactive)
(mapc #'disable-theme custom-enabled-themes)
(load-theme 'tangomod t)
- (sml/apply-theme 'automatic))
+ (sml/apply-theme 'automatic)
+ (font-lock-remove-keywords
+ 'org-mode a/org-mode-font-lock-keywords))
(defun a/lights-off ()
"Go dark."
(interactive)
(mapc #'disable-theme custom-enabled-themes)
(load-theme 'doom-tomorrow-night t)
- (sml/apply-theme 'automatic))
+ (sml/apply-theme 'automatic)
+ (font-lock-add-keywords
+ 'org-mode a/org-mode-font-lock-keywords t))
(bind-keys
("s-t d" . a/lights-off)