mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Add new doom|mark-buffer-as-real hook to term/eshell
This is simpler (and perhaps faster) than doom-real-buffer-functions. Better to reserve that for more complex logic.
This commit is contained in:
@ -29,9 +29,7 @@
|
||||
|
||||
:config
|
||||
;; Consider eshell buffers real
|
||||
(defun +eshell-p (buf)
|
||||
(eq (buffer-local-value 'major-mode buf) 'eshell-mode))
|
||||
(add-to-list 'doom-real-buffer-functions #'+eshell-p nil #'eq)
|
||||
(add-hook 'eshell-mode-hook #'doom|mark-buffer-as-real)
|
||||
|
||||
;; Keep track of open eshell buffers
|
||||
(add-hook 'eshell-mode-hook #'+eshell|init)
|
||||
|
@ -9,6 +9,4 @@
|
||||
(set! :env "SHELL")
|
||||
|
||||
;; Consider term buffers real
|
||||
(defun +term-p (buf)
|
||||
(eq (buffer-local-value 'major-mode buf) 'term-mode))
|
||||
(add-to-list 'doom-real-buffer-functions #'+term-p nil #'eq))
|
||||
(add-hook 'term-mode-hook #'doom|mark-buffer-as-real))
|
||||
|
Reference in New Issue
Block a user