eschulte pushed a commit to branch master in repository elpa. commit c9088f100941ae7abbe45c8e743be6d466e2bedb Author: Eric Schulte <schulte.e...@gmail.com> Date: Sun Jan 12 09:24:12 2014 -0700
added ws-stop-all convenience function --- doc/web-server.texi | 6 ++++++ web-server.el | 5 +++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/doc/web-server.texi b/doc/web-server.texi index 0e2c8e0..e86ff93 100644 --- a/doc/web-server.texi +++ b/doc/web-server.texi @@ -395,6 +395,12 @@ servers. @end example @end defun +@anchor{ws-stop-all} +@defun ws-stop-all +@code{ws-stop-all} stops all emacs web servers by mapping +@code{ws-stop} over @code{ws-servers}. +@end defun + @section Convenience Functions The following convenience functions automate many common tasks associated with responding to HTTP requests. diff --git a/web-server.el b/web-server.el index 944521c..7e713e9 100644 --- a/web-server.el +++ b/web-server.el @@ -131,6 +131,11 @@ function. (mapc #'delete-process (append (mapcar #'process (requests server)) (list (process server))))) +(defun ws-stop-all () + "Stop all servers in `ws-servers'." + (interactive) + (mapc #'ws-stop ws-servers)) + (defvar ws-http-common-methods '(GET HEAD POST PUT DELETE TRACE) "HTTP methods from http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html.")