Mercurial > emacs
diff lisp/server.el @ 90399:a5812696f7bf unicode-pre-font-backend
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 274-284)
- Update from CVS
- Update etc/MORE.STUFF.
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 101)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-62
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 17 May 2006 07:46:49 +0000 |
parents | 146cd8369025 06de67179ba1 |
children | 138027c8c982 |
line wrap: on
line diff
--- a/lisp/server.el Mon May 15 03:48:50 2006 +0000 +++ b/lisp/server.el Wed May 17 07:46:49 2006 +0000 @@ -252,8 +252,6 @@ Prefix arg means just kill any existing server communications subprocess." (interactive "P") - ;; Make sure there is a safe directory in which to place the socket. - (server-ensure-safe-dir server-socket-dir) ;; kill it dead! (if server-process (condition-case () (delete-process server-process) (error nil))) @@ -265,7 +263,10 @@ (while server-clients (let ((buffer (nth 1 (car server-clients)))) (server-buffer-done buffer))) + ;; Now any previous server is properly stopped. (unless leave-dead + ;; Make sure there is a safe directory in which to place the socket. + (server-ensure-safe-dir server-socket-dir) (if server-process (server-log (message "Restarting server"))) (letf (((default-file-modes) ?\700)) @@ -578,7 +579,7 @@ (if (or arg (not server-process) (memq (process-status server-process) '(signal exit))) - (server-start nil) + (server-mode 1) (apply 'server-switch-buffer (server-done)))) (defun server-switch-buffer (&optional next-buffer killed-one) @@ -637,14 +638,15 @@ (define-key ctl-x-map "#" 'server-edit) (defun server-unload-hook () - (server-start t) + (server-mode -1) (remove-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function) (remove-hook 'kill-emacs-query-functions 'server-kill-emacs-query-function) (remove-hook 'kill-buffer-hook 'server-kill-buffer)) +(add-hook 'kill-emacs-hook (lambda () (server-mode -1))) ;Cleanup upon exit. (add-hook 'server-unload-hook 'server-unload-hook) (provide 'server) -;;; arch-tag: 1f7ecb42-f00a-49f8-906d-61995d84c8d6 +;; arch-tag: 1f7ecb42-f00a-49f8-906d-61995d84c8d6 ;;; server.el ends here