Fix lack of syntax highlighting in :x scratch buffer

This commit is contained in:
Henrik Lissner 2017-04-25 22:56:49 -04:00
parent b2d19eac32
commit 010bc8de7b
2 changed files with 8 additions and 7 deletions

View file

@ -1,11 +1,11 @@
#+TITLE: DOOM Emacs Changelog
** Unreleased [38/52]
** Unreleased [39/52]
+ [-] app/finance
+ [-] app/crm
+ [-] Improve send-to-REPL workflow
+ [ ] Update screenshots
+ [ ] Fix lack of syntax highlighting in ~:x~ scratch buffer
+ [X] Fix lack of syntax highlighting in ~:x~ scratch buffer
+ [X] Fix modeline disappearing due to loss of state (~doom--modeline-format~ being killed on major mode change)
+ [0/4] Investigate potential plugins
+ [ ] feature/version-control: [[https://github.com/pidu/git-timemachine][git-timemachine]] (replacement for vc-annotate)

View file

@ -11,13 +11,14 @@ use the current window."
(buffer-substring beg end)))
(mode major-mode)
(old-project (doom-project-root))
(new-buf (get-buffer-create " *doom:scratch*")))
(new-buf (get-buffer-create "*doom:scratch*")))
(if bang
(switch-to-buffer new-buf)
(doom-popup-buffer new-buf))
(with-current-buffer new-buf
(setq default-directory old-project
mode-line-format (doom-modeline 'minimal))
(setq default-directory old-project)
(when (and (not (eq major-mode mode))
(functionp mode))
(funcall mode))
(if text (insert text)))
(if bang (switch-to-buffer new-buf) (doom-popup-buffer new-buf))))
(if text (insert text)))))