emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/server.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/server.el
Date: Mon, 10 Feb 2003 16:44:25 -0500

Index: emacs/lisp/server.el
diff -c emacs/lisp/server.el:1.89 emacs/lisp/server.el:1.90
*** emacs/lisp/server.el:1.89   Wed Jan 15 12:49:32 2003
--- emacs/lisp/server.el        Mon Feb 10 16:44:24 2003
***************
*** 100,107 ****
  (defvar server-process nil
    "The current server process.")
  
- (defvar server-previous-strings nil)
- 
  (defvar server-clients nil
    "List of current server clients.
  Each element is (CLIENTID BUFFERS...) where CLIENTID is a string
--- 100,105 ----
***************
*** 179,187 ****
        (or (bolp) (newline)))))
  
  (defun server-sentinel (proc msg)
-   ;; Purge server-previous-strings of the now irrelevant entry.
-   (setq server-previous-strings
-       (delq (assq proc server-previous-strings) server-previous-strings))
    (let ((client (assq proc server-clients)))
      ;; Remove PROC from the list of clients.
      (when client
--- 177,182 ----
***************
*** 282,291 ****
    "Process a request from the server to edit some files.
  PROC is the server process.  Format of STRING is \"PATH PATH PATH... \\n\"."
    (server-log string proc)
!   (let ((ps (assq proc server-previous-strings)))
!     (when (cdr ps)
!       (setq string (concat (cdr ps) string))
!       (setcdr ps nil)))
    ;; If the input is multiple lines,
    ;; process each line individually.
    (while (string-match "\n" string)
--- 277,286 ----
    "Process a request from the server to edit some files.
  PROC is the server process.  Format of STRING is \"PATH PATH PATH... \\n\"."
    (server-log string proc)
!   (let ((prev (process-get proc 'previous-string)))
!     (when prev
!       (setq string (concat prev string))
!       (process-put proc 'previous-string nil)))
    ;; If the input is multiple lines,
    ;; process each line individually.
    (while (string-match "\n" string)
***************
*** 362,370 ****
                      "When done with a buffer, type \\[server-edit]")))))))
    ;; Save for later any partial line that remains.
    (when (> (length string) 0)
!     (let ((ps (assq proc server-previous-strings)))
!       (if ps (setcdr ps string)
!       (push (cons proc string) server-previous-strings)))))
  
  (defun server-goto-line-column (file-line-col)
    (goto-line (nth 1 file-line-col))
--- 357,363 ----
                      "When done with a buffer, type \\[server-edit]")))))))
    ;; Save for later any partial line that remains.
    (when (> (length string) 0)
!     (process-put proc 'previous-string string)))
  
  (defun server-goto-line-column (file-line-col)
    (goto-line (nth 1 file-line-col))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]