Commit c48254fb authored by Juanma Barranquero's avatar Juanma Barranquero
Browse files

(server-process-filter): Fix typo in docstring.

(server-log): Reflow docstrings.
(server-delete-client, server-kill-emacs-query-function): Doc fixes.
(server-goto-line-column): Use `when'.
parent 72a69d7f
2007-10-28 Juanma Barranquero <lekktu@gmail.com>
* server.el (server-process-filter): Fix typo in docstring.
(server-log): Reflow docstrings.
(server-delete-client, server-kill-emacs-query-function): Doc fixes.
(server-goto-line-column): Use `when'.
2007-10-28 Juri Linkov <juri@jurta.org> 2007-10-28 Juri Linkov <juri@jurta.org>
* isearch.el (isearch-other-meta-char): Call `isearch-edit-string' * isearch.el (isearch-other-meta-char): Call `isearch-edit-string'
...@@ -32,7 +39,7 @@ ...@@ -32,7 +39,7 @@
2007-10-27 Vinicius Jose Latorre <viniciusjl@ig.com.br> 2007-10-27 Vinicius Jose Latorre <viniciusjl@ig.com.br>
* ps-print.el: Now detect if text foreground and background colors are * ps-print.el: Now detect if text foreground and background colors are
equals and replace the foreground color by another color, so the text equal and replace the foreground color by another color, so the text
becomes visible. Doc fix. becomes visible. Doc fix.
(ps-print-version): New version 6.8. (ps-print-version): New version 6.8.
(ps-default-fg, ps-default-bg): Docstring fix. (ps-default-fg, ps-default-bg): Docstring fix.
......
...@@ -239,7 +239,7 @@ ENV should be in the same format as `process-environment'." ...@@ -239,7 +239,7 @@ ENV should be in the same format as `process-environment'."
(progn ,@body)))) (progn ,@body))))
(defun server-delete-client (proc &optional noframe) (defun server-delete-client (proc &optional noframe)
"Delete CLIENT, including its buffers, terminals and frames. "Delete PROC, including its buffers, terminals and frames.
If NOFRAME is non-nil, let the frames live. (To be used from If NOFRAME is non-nil, let the frames live. (To be used from
`delete-frame-functions'.)" `delete-frame-functions'.)"
(server-log (concat "server-delete-client" (if noframe " noframe")) (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,8 +294,7 @@ If NOFRAME is non-nil, let the frames live. (To be used from
(defun server-log (string &optional client) (defun server-log (string &optional client)
"If a *server* buffer exists, write STRING to it for logging purposes. "If a *server* buffer exists, write STRING to it for logging purposes.
If CLIENT is non-nil, add a description of it to the logged If CLIENT is non-nil, add a description of it to the logged message."
message."
(when (get-buffer "*server*") (when (get-buffer "*server*")
(with-current-buffer "*server*" (with-current-buffer "*server*"
(goto-char (point-max)) (goto-char (point-max))
...@@ -572,7 +571,7 @@ Server mode runs a process that accepts commands from the ...@@ -572,7 +571,7 @@ Server mode runs a process that accepts commands from the
"BAUDRATE" "COLUMNS" "ESCDELAY" "HOME" "LINES" "BAUDRATE" "COLUMNS" "ESCDELAY" "HOME" "LINES"
"NCURSES_ASSUMED_COLORS" "NCURSES_NO_PADDING" "NCURSES_ASSUMED_COLORS" "NCURSES_NO_PADDING"
"NCURSES_NO_SETBUF" "TERM" "TERMCAP" "TERMINFO" "NCURSES_NO_SETBUF" "TERM" "TERMCAP" "TERMINFO"
"TERMINFO_DIRS" "TERMPATH" "TERMINFO_DIRS" "TERMPATH"
;; rxvt wants these ;; rxvt wants these
"COLORFGBG" "COLORTERM") "COLORFGBG" "COLORTERM")
(make-frame-on-tty tty type (make-frame-on-tty tty type
...@@ -590,7 +589,7 @@ Server mode runs a process that accepts commands from the ...@@ -590,7 +589,7 @@ Server mode runs a process that accepts commands from the
;; C functions `child_setup' and ;; C functions `child_setup' and
;; `getenv_internal' accordingly. ;; `getenv_internal' accordingly.
(environment . ,(process-get proc 'env))))))) (environment . ,(process-get proc 'env)))))))
;; ttys don't use the `display' parameter, but callproc.c does to set ;; ttys don't use the `display' parameter, but callproc.c does to set
;; the DISPLAY environment on subprocesses. ;; the DISPLAY environment on subprocesses.
(set-frame-parameter frame 'display (set-frame-parameter frame 'display
...@@ -737,7 +736,7 @@ The following commands are accepted by the server: ...@@ -737,7 +736,7 @@ The following commands are accepted by the server:
on this tty until it gets a -resume command. on this tty until it gets a -resume command.
`-resume' `-resume'
Resume this tty frame. The client sends this string when it Resume this tty frame. The client sends this string when it
gets the SIGCONT signal and it is the foreground process on its gets the SIGCONT signal and it is the foreground process on its
controlling tty. controlling tty.
...@@ -753,9 +752,8 @@ The following commands are accepted by the client: ...@@ -753,9 +752,8 @@ The following commands are accepted by the client:
used to forward window change signals to it. used to forward window change signals to it.
`-window-system-unsupported' `-window-system-unsupported'
Signals that the server does not Signals that the server does not support creating X frames;
support creating X frames; the client must try again with a tty the client must try again with a tty frame.
frame.
`-print STRING' `-print STRING'
Print STRING on stdout. Used to send values Print STRING on stdout. Used to send values
...@@ -765,8 +763,8 @@ The following commands are accepted by the client: ...@@ -765,8 +763,8 @@ The following commands are accepted by the client:
Signal an error (but continue processing). Signal an error (but continue processing).
`-suspend' `-suspend'
Suspend this terminal, i.e., stop the client process. Sent Suspend this terminal, i.e., stop the client process.
when the user presses C-z." Sent when the user presses C-z."
(server-log (concat "Received " string) proc) (server-log (concat "Received " string) proc)
;; First things first: let's check the authentication ;; First things first: let's check the authentication
(unless (process-get proc :authenticated) (unless (process-get proc :authenticated)
...@@ -793,7 +791,7 @@ The following commands are accepted by the client: ...@@ -793,7 +791,7 @@ The following commands are accepted by the client:
;; Save for later any partial line that remains. ;; Save for later any partial line that remains.
(when (> (length string) 0) (when (> (length string) 0)
(process-put proc 'previous-string string)) (process-put proc 'previous-string string))
;; In earlier versions of server.el (where we used an `emacsserver' ;; In earlier versions of server.el (where we used an `emacsserver'
;; process), there could be multiple lines. Nowadays this is not ;; process), there could be multiple lines. Nowadays this is not
;; supported any more. ;; supported any more.
...@@ -931,7 +929,7 @@ The following commands are accepted by the client: ...@@ -931,7 +929,7 @@ The following commands are accepted by the client:
;; Unknown command. ;; Unknown command.
(t (error "Unknown command: %s" arg))))) (t (error "Unknown command: %s" arg)))))
(setq frame (setq frame
(case tty-name (case tty-name
((nil) (if display (server-select-display display))) ((nil) (if display (server-select-display display)))
...@@ -967,7 +965,7 @@ The following commands are accepted by the client: ...@@ -967,7 +965,7 @@ The following commands are accepted by the client:
(run-hooks 'post-command-hook))))) (run-hooks 'post-command-hook)))))
(mapc 'funcall (nreverse commands)) (mapc 'funcall (nreverse commands))
;; Delete the client if necessary. ;; Delete the client if necessary.
(cond (cond
(nowait (nowait
...@@ -1008,8 +1006,8 @@ FILE-LINE-COL should be a three-element list as described in ...@@ -1008,8 +1006,8 @@ FILE-LINE-COL should be a three-element list as described in
`server-visit-files'." `server-visit-files'."
(goto-line (nth 1 file-line-col)) (goto-line (nth 1 file-line-col))
(let ((column-number (nth 2 file-line-col))) (let ((column-number (nth 2 file-line-col)))
(if (> column-number 0) (when (> column-number 0)
(move-to-column (1- column-number))))) (move-to-column (1- column-number)))))
(defun server-visit-files (files proc &optional nowait) (defun server-visit-files (files proc &optional nowait)
"Find FILES and return a list of buffers created. "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,7 +1157,7 @@ specifically for the clients and did not exist before their request for it."
(buffer-name (current-buffer)))))) (buffer-name (current-buffer))))))
(defun server-kill-emacs-query-function () (defun server-kill-emacs-query-function ()
"Ask before exiting Emacs it has live clients." "Ask before exiting Emacs if it has live clients."
(or (not server-clients) (or (not server-clients)
(let (live-client) (let (live-client)
(dolist (proc server-clients live-client) (dolist (proc server-clients live-client)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment