mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix disappearing modeline due to loss of state
This commit is contained in:
4
TODO.org
4
TODO.org
@ -1,12 +1,12 @@
|
||||
#+TITLE: DOOM Emacs Changelog
|
||||
|
||||
** Unreleased [37/52]
|
||||
** Unreleased [38/52]
|
||||
+ [-] app/finance
|
||||
+ [-] app/crm
|
||||
+ [-] Improve send-to-REPL workflow
|
||||
+ [ ] Update screenshots
|
||||
+ [ ] Fix lack of syntax highlighting in ~:x~ scratch buffer
|
||||
+ [ ] Fix modeline disappearing due to loss of state (~doom--modeline-format~ being killed on major mode change)
|
||||
+ [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)
|
||||
+ [ ] lang/org: [[https://github.com/Malabarba/latex-extra][orgit]] (org links to magit buffers)
|
||||
|
@ -172,9 +172,9 @@ for :align t on every rule."
|
||||
(doom-hide-modeline-mode +1))
|
||||
((and (symbolp modeline)
|
||||
(not (eq modeline 't)))
|
||||
(let ((doom--modeline-format (doom-modeline modeline)))
|
||||
(when doom--modeline-format
|
||||
(doom-hide-modeline-mode +1))))))
|
||||
(setq-local doom--modeline-format (doom-modeline modeline))
|
||||
(when doom--modeline-format
|
||||
(doom-hide-modeline-mode +1)))))
|
||||
;; show modeline
|
||||
(when doom-hide-modeline-mode
|
||||
(doom-hide-modeline-mode -1))))
|
||||
|
@ -49,7 +49,7 @@
|
||||
(add-hook! isearch-mode-end (setq echo-keystrokes 0.02))
|
||||
|
||||
;; A minor mode for toggling the mode-line
|
||||
(defvar doom--modeline-format nil
|
||||
(defvar-local doom--modeline-format nil
|
||||
"The modeline format to use when `doom-hide-modeline-mode' is active. Don't
|
||||
set this directly. Bind it in `let' instead.")
|
||||
(defvar-local doom--old-modeline-format nil
|
||||
@ -66,6 +66,7 @@ disabled.")
|
||||
doom--old-modeline-format nil))
|
||||
(force-mode-line-update))
|
||||
;; Ensure major-mode or theme changes don't overwrite these variables
|
||||
(put 'doom--modeline-format 'permanent-local t)
|
||||
(put 'doom--old-modeline-format 'permanent-local t)
|
||||
(put 'doom-hide-modeline-mode 'permanent-local t)
|
||||
|
||||
|
Reference in New Issue
Block a user