Add the tiny convenience function `process-alive-p'.
This commit is contained in:
parent
864db017b0
commit
bcd54f8370
4 changed files with 22 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-05-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* processes.texi (Process Information): Document
|
||||
`process-alive-p'.
|
||||
|
||||
2011-05-29 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* help.texi (Accessing Documentation):
|
||||
|
|
|
@ -859,6 +859,12 @@ For a network connection, @code{process-status} returns one of the symbols
|
|||
closed the connection, or Emacs did @code{delete-process}.
|
||||
@end defun
|
||||
|
||||
@defun process-alive-p process
|
||||
This function returns nin-@code{nil} if @var{process} is alive. A
|
||||
process is considered alive if its status is @code{run}, @code{open},
|
||||
@code{listen}, @code{connect} or @code{stop}.
|
||||
@end defun
|
||||
|
||||
@defun process-type process
|
||||
This function returns the symbol @code{network} for a network
|
||||
connection or server, @code{serial} for a serial port connection, or
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2011-05-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* subr.el (process-alive-p): New tiny convenience function.
|
||||
|
||||
2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/debug.el (debug): Save&restore not just the buffer's
|
||||
|
|
|
@ -1805,6 +1805,13 @@ Signal an error if the program returns with a non-zero exit status."
|
|||
(forward-line 1))
|
||||
(nreverse lines)))))
|
||||
|
||||
(defun process-alive-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)))
|
||||
|
||||
;; compatibility
|
||||
|
||||
(make-obsolete
|
||||
|
|
Loading…
Add table
Reference in a new issue