Fix error with which-key--buffer on startup

Use the hook instead.
Fixes #6358
This commit is contained in:
syl20bnr 2016-06-18 00:19:59 -04:00
parent 2738724ed4
commit 50d5cdd054
2 changed files with 6 additions and 6 deletions

View File

@ -360,9 +360,8 @@
"Globally display a ~ on empty lines in the fringe."
:evil-leader "T~")
;; don't enable it on some special buffers
(dolist (x (list spacemacs-buffer-name
which-key--buffer))
(with-current-buffer x (spacemacs/disable-vi-tilde-fringe)))
(with-current-buffer spacemacs-buffer-name (spacemacs/disable-vi-tilde-fringe))
(add-hook 'which-key-init-buffer-hook 'spacemacs/disable-vi-tilde-fringe)
;; after a major mode is loaded, check if the buffer is read only
;; if so, disable vi-tilde-fringe-mode
(add-hook 'after-change-major-mode-hook

View File

@ -23,9 +23,10 @@
"Display an overlay of ~ on empty lines."
:evil-leader "t~")
;; Don't enable it where it is detrimental.
(with-current-buffer "*spacemacs*" (vim-empty-lines-mode -1))
(with-current-buffer "*Messages*" (vim-empty-lines-mode -1))
(with-current-buffer which-key--buffer (vim-empty-lines-mode -1))
(dolist (x (list spacemacs-buffer-name
"*Messages*"))
(with-current-buffer x (vim-empty-lines-mode -1)))
(add-hook 'which-key-init-buffer-hook (lambda () (vim-empty-lines-mode -1)))
;; after a major mode is loaded, check if the buffer is read only
;; if so, disable vim-empty-lines-mode
(add-hook 'after-change-major-mode-hook (lambda ()