refactor: Code tidying
This commit is contained in:
@@ -6,22 +6,21 @@
|
||||
|
||||
|
||||
|
||||
(defun syd--set-popup-rules-for-repls-h ()
|
||||
(require 'doom-popup)
|
||||
(set-popup-rule!
|
||||
(lambda (bufname _)
|
||||
(when (boundp 'syd-repl-mode)
|
||||
(buffer-local-value 'syd-repl-mode (get-buffer bufname))))
|
||||
:ttl (lambda (buf)
|
||||
(unless (plist-get syd-repl-plist :persist)
|
||||
(when-let (process (get-buffer-process buf))
|
||||
(set-process-query-on-exit-flag process nil)
|
||||
(kill-process process)
|
||||
(kill-buffer buf))))
|
||||
:size 0.25
|
||||
:quit nil))
|
||||
|
||||
(add-hook 'on-init-ui-hook #'syd--set-popup-rules-for-repls-h 'append)
|
||||
(syd-add-hook 'on-init-ui-hook
|
||||
(defun syd--set-popup-rules-for-repls-h ()
|
||||
(require 'doom-popup)
|
||||
(set-popup-rule!
|
||||
(lambda (bufname _)
|
||||
(when (boundp 'syd-repl-mode)
|
||||
(buffer-local-value 'syd-repl-mode (get-buffer bufname))))
|
||||
:ttl (lambda (buf)
|
||||
(unless (plist-get syd-repl-plist :persist)
|
||||
(when-let (process (get-buffer-process buf))
|
||||
(set-process-query-on-exit-flag process nil)
|
||||
(kill-process process)
|
||||
(kill-buffer buf))))
|
||||
:size 0.25
|
||||
:quit nil)))
|
||||
|
||||
|
||||
;;; State & settings
|
||||
|
||||
Reference in New Issue
Block a user