        (ignore-errors (signal-process proc 'SIGINT))))
    (process-list)))
 
-(defun danylo/email-bg-refresh ()
+(defun danylo/email-bg-refresh (&optional stay)
   "Refresh the inbox in the background. This function does nothing
 if a mu4e is currently visible in any frame. I judge that it is
 dangerous then to kill the mu4e process, as it might be used by
-something important that the user is currently doing."
+something important that the user is currently doing.
+
+If STAY is not nil, then do not kill the mu4e process created
+when getting mail."
   (interactive)
   ;; Check if any mu4e buffers are open
   (setq danylo/mu4e~is~active nil)

	      ("C-c i w" . ispell-word)
	      ("C-x C-<backspace>" . electric-pair-delete-pair)
	      ("C-c f e" . danylo/org-emphasize-equation)
	      ("C-c x s" . danylo/toggle-spellcheck))
  :config
  (require 'latex)
  ;; Shell-escape compilation

  (interactive "P")
  (if arg (mu4e-quit)
    (progn
      (danylo/email-bg-refresh t)
      (mu4e))))

(general-define-key
