Skip to content

Commit

Permalink
buffer kill hook: check process live before kill
Browse files Browse the repository at this point in the history
  • Loading branch information
tecosaur committed May 1, 2022
1 parent 83e78f8 commit f9b3de4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lexic.el
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,10 @@ This mode locally removes any `spell-fu-mode' or `flyspell-mode' entries in
Consider resolving any edge cases with an addition to `lexic-mode-hook'."
(setq buffer-read-only t)
(add-hook 'kill-buffer-hook
(lambda () (kill-process (get-process lexic-process-name)))
(lambda ()
(let ((proc (get-process lexic-process-name)))
(when (process-live-p proc)
(kill-process proc))))
nil t)
(setq-local outline-regexp "\u200B+")
(setq-local outline-heading-end-regexp "\u2008")
Expand Down

0 comments on commit f9b3de4

Please sign in to comment.