* gnus-util.el (gnus-process-live-p): Copy over compat function.
authorLars Magne Ingebrigtsen <larsi@tmp-office.(none)>
Sun, 21 Aug 2011 04:22:38 +0000 (06:22 +0200)
committerLars Magne Ingebrigtsen <larsi@tmp-office.(none)>
Sun, 21 Aug 2011 04:22:38 +0000 (06:22 +0200)
lisp/ChangeLog
lisp/gnus-util.el

index ec240b5..5548d4d 100644 (file)
@@ -1,5 +1,7 @@
 2011-08-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-util.el (gnus-process-live-p): Copy over compat function.
+
        * pop3.el (pop3-wait-for-messages): If the pop3 process dies, stop
        processing.
 
index 03ff4a2..3495361 100644 (file)
@@ -1249,6 +1249,13 @@ This function saves the current buffer."
        (with-current-buffer gnus-group-buffer
         (eq major-mode 'gnus-group-mode))))
 
+(defun gnus-process-live-p (process)
+  "Returns non-nil if PROCESS is alive.
+A process is considered alive if its status is `run', `open',
+`listen', `connect' or `stop'."
+  (memq (process-status process)
+        '(run open listen connect stop)))
+
 (defun gnus-remove-if (predicate sequence &optional hash-table-p)
   "Return a copy of SEQUENCE with all items satisfying PREDICATE removed.
 SEQUENCE should be a list, a vector, or a string.  Returns always a list.