X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fgnuserv.el;h=01128a97d675636f895fd186439054dbd6628aff;hb=e47437dbf7b5331e93c4a2c5de17a3544060d806;hp=04bf42aceca382bb2aaed36269d3961540f8c975;hpb=82da33b61c3e2dd2937db17b75b2838188793053;p=chise%2Fxemacs-chise.git- diff --git a/lisp/gnuserv.el b/lisp/gnuserv.el index 04bf42a..01128a9 100644 --- a/lisp/gnuserv.el +++ b/lisp/gnuserv.el @@ -1,7 +1,7 @@ ;;; gnuserv.el --- Lisp interface code between Emacs and gnuserv ;; Copyright (C) 1989-1997 Free Software Foundation, Inc. -;; Version: 3.11 +;; Version: 3.12 ;; Author: Andy Norman (ange@hplb.hpl.hp.com), originally based on server.el ;; Hrvoje Niksic ;; Maintainer: Jan Vroonhof , @@ -337,8 +337,8 @@ visual screen. Totally visible frames are preferred. If none found, return nil "Process gnuserv client requests to execute Emacs commands." (setq gnuserv-string (concat gnuserv-string string)) ;; C-d means end of request. - (when (string-match "\C-d\\'" gnuserv-string) - (cond ((string-match "^[0-9]+" gnuserv-string) ; client request id + (when (string-match "\C-d\n?\\'" gnuserv-string) + (cond ((string-match "\\`[0-9]+" gnuserv-string) ; client request id (let ((header (read-from-string gnuserv-string))) ;; Set the client we are talking to. (setq gnuserv-current-client (car header)) @@ -359,8 +359,9 @@ visual screen. Totally visible frames are preferred. If none found, return nil (signal 'quit nil))) (setq gnuserv-string ""))) (t - (error "%s: invalid response from gnuserv" gnuserv-string) - (setq gnuserv-string ""))))) + (let ((response (car (split-string gnuserv-string "\C-d")))) + (setq gnuserv-string "") + (error "%s: invalid response from gnuserv" response)))))) ;; This function is somewhat of a misnomer. Actually, we write to the ;; server (using `process-send-string' to gnuserv-process), which