aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/processes.texi6
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/subr.el7
4 files changed, 22 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index bd92b2a7273..83cee10f899 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12011-05-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * processes.texi (Process Information): Document
4 `process-alive-p'.
5
12011-05-29 Chong Yidong <cyd@stupidchicken.com> 62011-05-29 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * help.texi (Accessing Documentation): 8 * help.texi (Accessing Documentation):
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 1a1b63683ce..2284699c82b 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -859,6 +859,12 @@ For a network connection, @code{process-status} returns one of the symbols
859closed the connection, or Emacs did @code{delete-process}. 859closed the connection, or Emacs did @code{delete-process}.
860@end defun 860@end defun
861 861
862@defun process-alive-p process
863This function returns nin-@code{nil} if @var{process} is alive. A
864process is considered alive if its status is @code{run}, @code{open},
865@code{listen}, @code{connect} or @code{stop}.
866@end defun
867
862@defun process-type process 868@defun process-type process
863This function returns the symbol @code{network} for a network 869This function returns the symbol @code{network} for a network
864connection or server, @code{serial} for a serial port connection, or 870connection or server, @code{serial} for a serial port connection, or
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0070f3a3945..384a30cb7cd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12011-05-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * subr.el (process-alive-p): New tiny convenience function.
4
12011-05-31 Stefan Monnier <monnier@iro.umontreal.ca> 52011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * emacs-lisp/debug.el (debug): Save&restore not just the buffer's 7 * emacs-lisp/debug.el (debug): Save&restore not just the buffer's
diff --git a/lisp/subr.el b/lisp/subr.el
index 4fe9987b95b..08099dc1fdd 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1805,6 +1805,13 @@ Signal an error if the program returns with a non-zero exit status."
1805 (forward-line 1)) 1805 (forward-line 1))
1806 (nreverse lines))))) 1806 (nreverse lines)))))
1807 1807
1808(defun process-alive-p (process)
1809 "Returns non-nil if PROCESS is alive.
1810A process is considered alive if its status is `run', `open',
1811`listen', `connect' or `stop'."
1812 (memq (process-status process)
1813 '(run open listen connect stop)))
1814
1808;; compatibility 1815;; compatibility
1809 1816
1810(make-obsolete 1817(make-obsolete