diff options
| author | Karoly Lorentey | 2003-12-30 19:27:57 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2003-12-30 19:27:57 +0000 |
| commit | 16c290d8c16fb0fdb574c837c6b1badbc655efe2 (patch) | |
| tree | 26e7915477ebe5b8c3847e70b9230a6efa134e6c /lisp | |
| parent | 9d9f18127ffc1bc26358a5d48917ef4e4bafbddc (diff) | |
| download | emacs-16c290d8c16fb0fdb574c837c6b1badbc655efe2.tar.gz emacs-16c290d8c16fb0fdb574c837c6b1badbc655efe2.zip | |
Major bugfixes and slight enhancements.
src/dispextern.h (get_tty_size, tabs_safe_p, init_baud_rate): Update
prototypes.
src/dispnew.c (window_change_signal): Update call to get_tty_size.
src/frame.c (Fmake_terminal_frame): Ditto.
src/keyboard.c (Fsuspend_emacs): Ditto.
src/sysdep.c: Eliminate tty_outputs, wherever possible. (The
exceptions are init_sys_modes and reset_sys_modes, which need access
to tty-local parameters).
(init_baud_rate): Change tty_output parameter to a simple file descriptor.
(narrow_foreground_group, widen_foreground_group): Ditto.
(tabs_safe_p, get_tty_size): Ditto.
(init_sys_modes): Update narrow_foreground_group invocation.
(reset_sys_modes): Update widen_foreground_group invocation.
(request_sigio)[!FASYNC && STRIDE]: Fix function signature.
src/term.c (delete_tty): Only close output file handle if it is
different from input. Re-enable freeing of Wcm.
(term_init): Update get_tty_size, tabs_safe_p and init_baud_rate
invocations.
lib-src/emacsclient.c (here): Renamed to frame.
(longopts): Change --here to --frame. The -h short option may be
confused with --help.
(decode_options, print_help_and_exit): Update to reflect above changes.
(main): Ditto.
lisp/server.el (server-start): Fix frame-live-p call syntax.
(server-process-filter): Handle 'emacsclient -f' without file
arguments. Don't return any values to emacsclient when 'emacsclient
-f -e'.
(server-switch-buffer): Prevent infinite recursion when there are no
files to edit.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-27
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/server.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/server.el b/lisp/server.el index 9c841071a99..bf7d4a5d358 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -271,7 +271,7 @@ Prefix arg means just kill any existing server communications subprocess." | |||
| 271 | (while server-frames | 271 | (while server-frames |
| 272 | (let ((frame (cadar server-frames))) | 272 | (let ((frame (cadar server-frames))) |
| 273 | (setq server-frames (cdr server-frames)) | 273 | (setq server-frames (cdr server-frames)) |
| 274 | (when frame-live-p frame (delete-frame frame 'force)))) | 274 | (when (frame-live-p frame) (delete-frame frame 'force)))) |
| 275 | (unless leave-dead | 275 | (unless leave-dead |
| 276 | (if server-process | 276 | (if server-process |
| 277 | (server-log (message "Restarting server"))) | 277 | (server-log (message "Restarting server"))) |
| @@ -314,7 +314,7 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." | |||
| 314 | (coding-system (and default-enable-multibyte-characters | 314 | (coding-system (and default-enable-multibyte-characters |
| 315 | (or file-name-coding-system | 315 | (or file-name-coding-system |
| 316 | default-file-name-coding-system))) | 316 | default-file-name-coding-system))) |
| 317 | client nowait eval | 317 | client nowait eval newframe |
| 318 | (files nil) | 318 | (files nil) |
| 319 | (lineno 1) | 319 | (lineno 1) |
| 320 | (columnno 0)) | 320 | (columnno 0)) |
| @@ -336,6 +336,7 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." | |||
| 336 | (setq request ""))))) | 336 | (setq request ""))))) |
| 337 | ;; Open a new frame at the client. ARG is the name of the pseudo tty. | 337 | ;; Open a new frame at the client. ARG is the name of the pseudo tty. |
| 338 | ((and (equal "-pty" arg) (string-match "\\([^ ]*\\) \\([^ ]*\\) " request)) | 338 | ((and (equal "-pty" arg) (string-match "\\([^ ]*\\) \\([^ ]*\\) " request)) |
| 339 | (setq newframe t) | ||
| 339 | (let ((pty (server-unquote-arg (match-string 1 request))) | 340 | (let ((pty (server-unquote-arg (match-string 1 request))) |
| 340 | (type (server-unquote-arg (match-string 2 request)))) | 341 | (type (server-unquote-arg (match-string 2 request)))) |
| 341 | (setq request (substring request (match-end 0))) | 342 | (setq request (substring request (match-end 0))) |
| @@ -364,7 +365,7 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." | |||
| 364 | (if eval | 365 | (if eval |
| 365 | (condition-case err | 366 | (condition-case err |
| 366 | (let ((v (eval (car (read-from-string arg))))) | 367 | (let ((v (eval (car (read-from-string arg))))) |
| 367 | (when v | 368 | (when (and (not newframe v)) |
| 368 | (with-temp-buffer | 369 | (with-temp-buffer |
| 369 | (let ((standard-output (current-buffer))) | 370 | (let ((standard-output (current-buffer))) |
| 370 | (pp v) | 371 | (pp v) |
| @@ -382,7 +383,7 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." | |||
| 382 | (server-visit-files files client nowait) | 383 | (server-visit-files files client nowait) |
| 383 | (run-hooks 'post-command-hook)) | 384 | (run-hooks 'post-command-hook)) |
| 384 | ;; CLIENT is now a list (CLIENTNUM BUFFERS...) | 385 | ;; CLIENT is now a list (CLIENTNUM BUFFERS...) |
| 385 | (if (null (cdr client)) | 386 | (if (and (not newframe) (null (cdr client))) |
| 386 | ;; This client is empty; get rid of it immediately. | 387 | ;; This client is empty; get rid of it immediately. |
| 387 | (progn | 388 | (progn |
| 388 | (let ((frame (assq (car client) server-frames))) | 389 | (let ((frame (assq (car client) server-frames))) |
| @@ -607,7 +608,8 @@ Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it." | |||
| 607 | ;; since we've already effectively done that. | 608 | ;; since we've already effectively done that. |
| 608 | (if (null next-buffer) | 609 | (if (null next-buffer) |
| 609 | (if server-clients | 610 | (if server-clients |
| 610 | (server-switch-buffer (nth 1 (car server-clients)) killed-one) | 611 | (let ((buffer (nth 1 (car server-clients)))) |
| 612 | (and buffer (server-switch-buffer buffer killed-one))) | ||
| 611 | (unless (or killed-one (window-dedicated-p (selected-window))) | 613 | (unless (or killed-one (window-dedicated-p (selected-window))) |
| 612 | (switch-to-buffer (other-buffer)) | 614 | (switch-to-buffer (other-buffer)) |
| 613 | (message "No server buffers remain to edit"))) | 615 | (message "No server buffers remain to edit"))) |