* mu4e: add mu4e-running-p, document it

This commit is contained in:
djcb
2012-10-06 22:22:11 +03:00
parent 0eada7c9ba
commit 1c6e882142
3 changed files with 23 additions and 17 deletions

View File

@ -90,14 +90,13 @@ the length (in hex).")
mu4e~proc-process nil
mu4e~proc-buf nil))
(defun mu4e~proc-is-running ()
(defun mu4e~proc-running-p ()
"Whether the mu process is running."
(when (and mu4e~proc-process
(memq (process-status mu4e~proc-process)
'(run open listen connect stop)))
t))
(defsubst mu4e~proc-eat-sexp-from-buf ()
"'Eat' the next s-expression from `mu4e~proc-buf'. Note: this is a string,
not an emacs-buffer. `mu4e~proc-buf gets its contents from the
@ -293,7 +292,7 @@ terminates."
(defsubst mu4e~proc-send-command (frm &rest args)
"Send as command to the mu server process; start the process if needed."
(unless (mu4e~proc-is-running)
(unless (mu4e~proc-running-p)
(mu4e~proc-start))
(let ((cmd (apply 'format frm args)))
(mu4e-log 'to-server "%s" cmd)