aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/server.el32
2 files changed, 23 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3a87e527307..30bdbefd98e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12007-10-28 Juanma Barranquero <lekktu@gmail.com>
2
3 * server.el (server-process-filter): Fix typo in docstring.
4 (server-log): Reflow docstrings.
5 (server-delete-client, server-kill-emacs-query-function): Doc fixes.
6 (server-goto-line-column): Use `when'.
7
12007-10-28 Juri Linkov <juri@jurta.org> 82007-10-28 Juri Linkov <juri@jurta.org>
2 9
3 * isearch.el (isearch-other-meta-char): Call `isearch-edit-string' 10 * isearch.el (isearch-other-meta-char): Call `isearch-edit-string'
@@ -32,7 +39,7 @@
322007-10-27 Vinicius Jose Latorre <viniciusjl@ig.com.br> 392007-10-27 Vinicius Jose Latorre <viniciusjl@ig.com.br>
33 40
34 * ps-print.el: Now detect if text foreground and background colors are 41 * ps-print.el: Now detect if text foreground and background colors are
35 equals and replace the foreground color by another color, so the text 42 equal and replace the foreground color by another color, so the text
36 becomes visible. Doc fix. 43 becomes visible. Doc fix.
37 (ps-print-version): New version 6.8. 44 (ps-print-version): New version 6.8.
38 (ps-default-fg, ps-default-bg): Docstring fix. 45 (ps-default-fg, ps-default-bg): Docstring fix.
diff --git a/lisp/server.el b/lisp/server.el
index 70d2283b0eb..6d73bb6ee9b 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -239,7 +239,7 @@ ENV should be in the same format as `process-environment'."
239 (progn ,@body)))) 239 (progn ,@body))))
240 240
241(defun server-delete-client (proc &optional noframe) 241(defun server-delete-client (proc &optional noframe)
242 "Delete CLIENT, including its buffers, terminals and frames. 242 "Delete PROC, including its buffers, terminals and frames.
243If NOFRAME is non-nil, let the frames live. (To be used from 243If NOFRAME is non-nil, let the frames live. (To be used from
244`delete-frame-functions'.)" 244`delete-frame-functions'.)"
245 (server-log (concat "server-delete-client" (if noframe " noframe")) 245 (server-log (concat "server-delete-client" (if noframe " noframe"))
@@ -294,8 +294,7 @@ If NOFRAME is non-nil, let the frames live. (To be used from
294 294
295(defun server-log (string &optional client) 295(defun server-log (string &optional client)
296 "If a *server* buffer exists, write STRING to it for logging purposes. 296 "If a *server* buffer exists, write STRING to it for logging purposes.
297If CLIENT is non-nil, add a description of it to the logged 297If CLIENT is non-nil, add a description of it to the logged message."
298message."
299 (when (get-buffer "*server*") 298 (when (get-buffer "*server*")
300 (with-current-buffer "*server*" 299 (with-current-buffer "*server*"
301 (goto-char (point-max)) 300 (goto-char (point-max))
@@ -572,7 +571,7 @@ Server mode runs a process that accepts commands from the
572 "BAUDRATE" "COLUMNS" "ESCDELAY" "HOME" "LINES" 571 "BAUDRATE" "COLUMNS" "ESCDELAY" "HOME" "LINES"
573 "NCURSES_ASSUMED_COLORS" "NCURSES_NO_PADDING" 572 "NCURSES_ASSUMED_COLORS" "NCURSES_NO_PADDING"
574 "NCURSES_NO_SETBUF" "TERM" "TERMCAP" "TERMINFO" 573 "NCURSES_NO_SETBUF" "TERM" "TERMCAP" "TERMINFO"
575 "TERMINFO_DIRS" "TERMPATH" 574 "TERMINFO_DIRS" "TERMPATH"
576 ;; rxvt wants these 575 ;; rxvt wants these
577 "COLORFGBG" "COLORTERM") 576 "COLORFGBG" "COLORTERM")
578 (make-frame-on-tty tty type 577 (make-frame-on-tty tty type
@@ -590,7 +589,7 @@ Server mode runs a process that accepts commands from the
590 ;; C functions `child_setup' and 589 ;; C functions `child_setup' and
591 ;; `getenv_internal' accordingly. 590 ;; `getenv_internal' accordingly.
592 (environment . ,(process-get proc 'env))))))) 591 (environment . ,(process-get proc 'env)))))))
593 592
594 ;; ttys don't use the `display' parameter, but callproc.c does to set 593 ;; ttys don't use the `display' parameter, but callproc.c does to set
595 ;; the DISPLAY environment on subprocesses. 594 ;; the DISPLAY environment on subprocesses.
596 (set-frame-parameter frame 'display 595 (set-frame-parameter frame 'display
@@ -737,7 +736,7 @@ The following commands are accepted by the server:
737 on this tty until it gets a -resume command. 736 on this tty until it gets a -resume command.
738 737
739`-resume' 738`-resume'
740 Resume this tty frame. The client sends this string when it 739 Resume this tty frame. The client sends this string when it
741 gets the SIGCONT signal and it is the foreground process on its 740 gets the SIGCONT signal and it is the foreground process on its
742 controlling tty. 741 controlling tty.
743 742
@@ -753,9 +752,8 @@ The following commands are accepted by the client:
753 used to forward window change signals to it. 752 used to forward window change signals to it.
754 753
755`-window-system-unsupported' 754`-window-system-unsupported'
756 Signals that the server does not 755 Signals that the server does not support creating X frames;
757 support creating X frames; the client must try again with a tty 756 the client must try again with a tty frame.
758 frame.
759 757
760`-print STRING' 758`-print STRING'
761 Print STRING on stdout. Used to send values 759 Print STRING on stdout. Used to send values
@@ -765,8 +763,8 @@ The following commands are accepted by the client:
765 Signal an error (but continue processing). 763 Signal an error (but continue processing).
766 764
767`-suspend' 765`-suspend'
768 Suspend this terminal, i.e., stop the client process. Sent 766 Suspend this terminal, i.e., stop the client process.
769 when the user presses C-z." 767 Sent when the user presses C-z."
770 (server-log (concat "Received " string) proc) 768 (server-log (concat "Received " string) proc)
771 ;; First things first: let's check the authentication 769 ;; First things first: let's check the authentication
772 (unless (process-get proc :authenticated) 770 (unless (process-get proc :authenticated)
@@ -793,7 +791,7 @@ The following commands are accepted by the client:
793 ;; Save for later any partial line that remains. 791 ;; Save for later any partial line that remains.
794 (when (> (length string) 0) 792 (when (> (length string) 0)
795 (process-put proc 'previous-string string)) 793 (process-put proc 'previous-string string))
796 794
797 ;; In earlier versions of server.el (where we used an `emacsserver' 795 ;; In earlier versions of server.el (where we used an `emacsserver'
798 ;; process), there could be multiple lines. Nowadays this is not 796 ;; process), there could be multiple lines. Nowadays this is not
799 ;; supported any more. 797 ;; supported any more.
@@ -931,7 +929,7 @@ The following commands are accepted by the client:
931 929
932 ;; Unknown command. 930 ;; Unknown command.
933 (t (error "Unknown command: %s" arg))))) 931 (t (error "Unknown command: %s" arg)))))
934 932
935 (setq frame 933 (setq frame
936 (case tty-name 934 (case tty-name
937 ((nil) (if display (server-select-display display))) 935 ((nil) (if display (server-select-display display)))
@@ -967,7 +965,7 @@ The following commands are accepted by the client:
967 (run-hooks 'post-command-hook))))) 965 (run-hooks 'post-command-hook)))))
968 966
969 (mapc 'funcall (nreverse commands)) 967 (mapc 'funcall (nreverse commands))
970 968
971 ;; Delete the client if necessary. 969 ;; Delete the client if necessary.
972 (cond 970 (cond
973 (nowait 971 (nowait
@@ -1008,8 +1006,8 @@ FILE-LINE-COL should be a three-element list as described in
1008`server-visit-files'." 1006`server-visit-files'."
1009 (goto-line (nth 1 file-line-col)) 1007 (goto-line (nth 1 file-line-col))
1010 (let ((column-number (nth 2 file-line-col))) 1008 (let ((column-number (nth 2 file-line-col)))
1011 (if (> column-number 0) 1009 (when (> column-number 0)
1012 (move-to-column (1- column-number))))) 1010 (move-to-column (1- column-number)))))
1013 1011
1014(defun server-visit-files (files proc &optional nowait) 1012(defun server-visit-files (files proc &optional nowait)
1015 "Find FILES and return a list of buffers created. 1013 "Find FILES and return a list of buffers created.
@@ -1159,7 +1157,7 @@ specifically for the clients and did not exist before their request for it."
1159 (buffer-name (current-buffer)))))) 1157 (buffer-name (current-buffer))))))
1160 1158
1161(defun server-kill-emacs-query-function () 1159(defun server-kill-emacs-query-function ()
1162 "Ask before exiting Emacs it has live clients." 1160 "Ask before exiting Emacs if it has live clients."
1163 (or (not server-clients) 1161 (or (not server-clients)
1164 (let (live-client) 1162 (let (live-client)
1165 (dolist (proc server-clients live-client) 1163 (dolist (proc server-clients live-client)