refactor: Code tidying

This commit is contained in:
Madeleine Sydney
2025-02-13 14:17:16 -07:00
parent 03491612f2
commit e1709b2969
5 changed files with 71 additions and 63 deletions

View File

@@ -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