1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 15:00:45 -08:00
Commit graph

75 commits

Author SHA1 Message Date
Karoly Lorentey
ec16044407 Fix core dump in redisplay window. (Reported by Yoshiaki Kasahara.) Plus cleanups.
* src/xdisp.c (handle_single_display_prop): Use FRAME_WINDOW_P instead of
  checking against specific frame types.  Ignore images on non-window
  frames.
  (echo_area_display): Use FRAME_INITIAL_P to check for initial frame.
  (redisplay_preserve_echo_area): Update for multi-tty support.
  (redisplay_window): Don't bother with toolbars, fringe bitmaps or
  vertical borders on tty frames.
  (display_line): Remove superflous #ifdefs.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-260
2004-10-14 14:58:43 +00:00
Karoly Lorentey
90e06c2e20 README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-248
2004-09-20 13:59:19 +00:00
Karoly Lorentey
5cd4323386 Inhibit redisplay while frames are being deleted after an X disconnect.
* src/xterm.c (x_connection_closed): Inhibit redisplay while frames are
  being deleted.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-243
2004-09-10 18:07:22 +00:00
Karoly Lorentey
90376e6f17 Fix typo in server.el (Han Boetes, Ted Morse, Ami Fischman)
* lisp/server.el ("\C-x#"): Fix typo.  (Thanks Han Boetes, Ted Morse and
  Ami Fischman.)


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-235
2004-08-23 08:50:01 +00:00
Karoly Lorentey
ccc84c2458 README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-233
2004-08-19 14:30:16 +00:00
Karoly Lorentey
422f68e04e README updates, including a new Tips & Tricks section
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-231
2004-08-13 14:48:29 +00:00
Karoly Lorentey
be0f41236b Updated archive location in docs. (Thanks to Dan Waber.)
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-230
2004-08-11 17:33:32 +00:00
Karoly Lorentey
d03a8fe4de Cleaned up README compile & test instructions.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-226
2004-08-05 14:54:57 +00:00
Karoly Lorentey
1eceabe304 Fix Viper with simultaneous X and tty display devices. (Rep. by IRIE Tetsuya.)
* lisp/emulation/viper-init.el (viper-has-face-support-p): Acknowledge
  that Emacs has face support on ttys.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-214
2004-07-10 22:26:28 +00:00
Karoly Lorentey
b6660415b3 Implemented display ids for multiple emacsclients on the same tty. Plus assorted bugfixes.
* lisp/frame.el (make-frame-on-display): Update doc.
(make-frame): Handle display-id parameter.  Update doc.
(frames-on-display-list): Update for display ids.
(framep-on-display): Ditto.
(suspend-frame): Use display-name, not frame-tty-name.
(selected-display): New function.

* lisp/server.el (server-delete-client): Use delete-display, not delete-tty.
(server-tty-live-p, server-handle-delete-tty): Removed.
(server-handle-delete-frame): Delete tty clients, if needed.
(server-process-filter): Set the display parameter, and use it when appropriate.
(server-handle-suspend-tty): Use the display parameter.
(server-start, server-unload-hook): Removed obsolete delete-tty hook.

* lisp/talk.el (talk): Always use talk-add-display.
(talk-add-tty-frame, talk-handle-delete-tty): Removed.
(talk-handle-delete-frame): New function.
(talk-add-display): Open a new frame only if parameter was not a frame.

* src/dispextern.h (get_display, Fdisplay_tty_type):  New prototypes.
(Fframe_tty_type): Removed.

* src/dispnew.c (init_display): Use Fdisplay_tty_type, not Fframe_tty_type.

* src/frame.c (Qdisplay_id, Qdisplay_live_p): New symbols.
(make_terminal_frame): Get display as a parameter.
(Fmake_terminal_frame): Get/create display here; pass it to
make_terminal_frame.
(Fframe_display): New function.
(Fdelete_frame): Stop if the hook deleted the frame.
(syms_of_frame): Register new stuff.

* src/frame.h (Qdisplay_id, Qdisplay_live_p, make_terminal_frame):
Updated prototypes.

* src/keyboard.c (interrupt_signal): Updated comment.

* src/term.c (Vdelete_tty_after_functions): Removed variable.
(Qframe_tty_name, Qframe_tty_type): Removed.
(next_display_id): New var.
(tty_ring_bell): Don't do anything on suspended frames.
(Ftty_display_color_p, Ftty_display_color_cells): Doc update.
(get_display): New function.
(get_tty_display): Use it.
(get_named_tty_display): Ignore suspended displays.
(Fframe_tty_name): Renamed to Fdisplay_name.  Handle all kinds of
displays.
(Fframe_tty_type): Renamed to Fdisplay_tty_type.
(init_initial_display): Set display name.
(term_init): Allow more displays on the same device.  Set display name.
(Fdelete_tty): Removed.
(delete_tty): Don't run hooks.
(create_display): Set display id.
(delete_display): Free display name.
(Fdelete_display, Fdisplay_live_p, Fdisplay_list): New functions.
(Fsuspend_tty): Call hook with display id.  Doc update.
(Fresume_tty): Refuse to resume when there is already an active display
on the same device.  Call hook with display id.  Doc update.
(syms_of_term): Reflect above changes.

* src/termhooks.h (struct display): Added `id' and `name' members.
(DISPLAY_ACTIVE_P): New macro.

* src/xfns.c (check_x_display_info): Handle display ids.
(Fx_create_frame): Try to get display from `display-id' parameter.

* src/xterm.c (x_term_init): Set display name.
(x_delete_display): Handle the case when `font_table' is NULL.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-207
2004-07-04 04:48:55 +00:00
Karoly Lorentey
8c8d5f3503 Fix byte-compile errors during bootstrap. (Reported by Juraj Kubelka.)
* src/term.c (Ftty_display_color_cells): Return 0 in case of an error, not nil.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-201
2004-06-15 18:46:31 +00:00
Karoly Lorentey
6ea444cf38 README.multi-tty update.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-192
2004-06-08 00:37:38 +00:00
Karoly Lorentey
7d1a6b3347 README.multi-tty update.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-188
2004-06-07 05:30:42 +00:00
Karoly Lorentey
3de8a25339 Don't ignore SIGWINCH under X (contributed by Yoshiaki Kasahara).
src/xterm.c (x_initialize): Don't disable SIGWINCH (small fix
contributed by Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp>).

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-181
2004-05-29 15:23:07 +00:00
Karoly Lorentey
7c10362ec7 Fix window-system-default-frame-alist (ARISAWA Akihiro).
lisp/frame.el (make-frame): Use the cdr of the value returned by assq.
By ARISAWA Akihiro (<ari@mbf.ocn.ne.jp>).

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-180
2004-05-27 18:23:48 +00:00
Karoly Lorentey
f76e7db651 README.multi-tty updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-177
2004-05-27 17:23:38 +00:00
Karoly Lorentey
d4d89d3741 Update README.multi-tty.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-172
2004-05-23 04:39:43 +00:00
Karoly Lorentey
f3c9434fad Add kludge to prevent overriding keyboard-coding-system customization.
lisp/international/mule-cmds.el (set-locale-environment): Don't set
keyboard-coding-system if it is already set (reported by Friedrich
Delgado Friedrichs).

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-165
2004-05-18 20:30:43 +00:00
Karoly Lorentey
35dfa9b69e Fix fatal error during startup (rep. by Friedrich Delgado Friedrichs)
lisp/loadup.el: Unconditionally preload server.

lisp/server.el: Change server-getenv to a simple defun.

src/Makefile.in (lisp, shortlisp): Added server.elc.
mac/makefile.MPW (LispSource): Ditto.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-164
2004-05-18 19:58:00 +00:00
Karoly Lorentey
2cd1371d9b Fixed environment variable handling during terminal initialization.
lisp/server.el (server-getenv): New inline function.

lisp/term/rxvt.el (rxvt-set-background-mode): Use server-getenv
instead of getenv.
lisp/term/x-win.el (x-initialize-window-system): Ditto.
lisp/term/xterm.el (xterm-rxvt-set-background-mode): Ditto.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-158
2004-05-08 16:20:28 +00:00
Karoly Lorentey
6ad9aaa961 Mention `tla replay' in README.multi-tty (Gaute Strokkenes).
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-151
2004-04-23 13:56:26 +00:00
Karoly Lorentey
540216761e Fix frame parameter handling in server.el.
lisp/server.el (server-process-filter): Work around make-frame
frame parameter bogosity by using modify-frame-parameters.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-145
2004-04-18 02:24:18 +00:00
Karoly Lorentey
9002956fd8 Another server.el overhaul.
lib-src/emacsclient.c (xstrdup): New function.
(quote_argument): Use xmalloc, not malloc.
(main): Send environment variable values.

lisp/server.el (server-clients): Documentation update.
(server-ttys, server-frames): Removed.
(server-client, server-client-get, server-client-set)
(server-clients-with, server-add-client)
(server-delete-client): New functions.
(server-sentinel, server-handle-suspend-tty)
(server-handle-delete-tty, server-handle-delete-frame)
(server-start, server-process-filter, server-visit-files)
(server-buffer-done, server-kill-buffer-query-function)
(server-kill-emacs-query-function, server-switch-buffer): Use them.
(server-log): Handle both kinds of client references.
(server-start): Set up all hooks here.
(server-process-filter): Cleanup.  Store version in client.
Handle -env commands for passing environment variable values.
(server-buffer-done): Don't close clients that were created bufferless.
(server-switch-buffer): Only look at frameless clients.
Don't switch away from current buffer if there is no next-buffer.
(server-unload-hook): Remove frame/tty hooks, too.

lisp/server.el (server-quote-arg, server-unquote-arg)
(server-process-filter, server-kill-buffer-query-function)
(server-kill-emacs-query-function): Doc update.
(server-buffer-done, server-switch-buffer): Use buffer-live-p, not
buffer-name.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-143
2004-04-18 01:34:11 +00:00
Karoly Lorentey
2a0c7b06f7 README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-141
2004-04-17 18:24:32 +00:00
Karoly Lorentey
d3c554a0d0 README changes.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-137
2004-04-13 18:18:05 +00:00
Karoly Lorentey
026ad6ba81 Fix cut'n'paste during a multi-display session (Mark Plaksin, Robert Chassell).
lisp/simple.el: Make interprogram-cut-function and
interprogram-paste-function frame-local.  (Reported by Mark Plaksin
and Robert Chassell).

lisp/faces.el (x-create-frame-with-faces)
(tty-create-frame-with-faces): Set the interprogram-cut-function and
interprogram-paste-function frame parameters.

lisp/x-win.el (x-initialize-window-system): Don't set
interprogram-cut-function and interprogram-paste-function.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-124
2004-03-26 04:35:08 +00:00
Karoly Lorentey
cd5355f971 README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-116
2004-03-11 01:55:50 +00:00
Karoly Lorentey
2666355c45 Fix background-mode on terminal frames (Dan Nicolaescu).
lisp/faces.el (frame-set-background-mode): Guess the background mode
on terminal frames from the termcap type string.
(tty-create-frame-with-faces): Switch to the new frame during its setup.
Load the customization library corresponding to the terminal type of the
newly created frame.  (Reported by Dan Nicolaescu <dann at ics dot uci dot edu>.)

lisp/startup.el (normal-top-level): Moved background-mode heuristic to
frame-set-background-mode.

src/dispnew.c (init_display): Update the tty-type frame parameter of
the initial terminal frame.

src/frame.h (Qtty, Qtty_type): New externs.

src/term.c (term_init): Update comments.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-114
2004-03-11 01:11:38 +00:00
Karoly Lorentey
4388f1016b README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-110
2004-03-06 12:13:42 +00:00
Karoly Lorentey
eb1f46c943 README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-109
2004-03-02 10:55:14 +00:00
Karoly Lorentey
0b0d3e0bce Implemented suspending of emacsclient frames.
lib-src/emacsclient.c (quote_file_name): Renamed to quote_argument.
(unquote_argument, handle_sigcont, handle_sigtstp): New functions.
(out, in): New global variables for communicating with the Emacs process.
(init_signals): Set up handlers for SIGCONT, SIGTSTP and SIGTTOU.
(main): Changed out and in to global variables.  Prepend `-eval' or
'-file' to each argument.  Use fsync to force sending the strings to Emacs.
Removed obsolete -bad-version code.  Support the -suspend command.
Cleaned up newline handling.

lisp/frame.el (suspend-frame): New function.
Substitute key definition of suspend-emacs with suspend-frame.

lisp/server.el (server-log): Cosmetic change in log format.
(server-handle-delete-tty, server-handle-delete-frame): Added logging.
(server-handle-suspend-tty, server-quote-arg): New functions.
(server-start): Install server-handle-suspend-tty.
(server-process-filter): Reorganized source code for clarity.
Implemented -resume, -suspend and -ignore commands.

lisp/term/x-win.el (x-initialize-window-system): Don't change the
binding of C-z.

src/cm.c: Replaced TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT calls with
their macro expansion.
src/dispnew.c: Ditto.
src/frame.c: Ditto.
src/keyboard.c: Ditto.
src/sysdep.c: Ditto.

src/keyboard.c (tty_read_avail_input): Don't read if the terminal is
suspended.
src/sysdep.c (discard_tty_input, init_sys_modes, reset_sys_modes): Ditto.
src/term.c (tty_set_terminal_modes, tty_reset_terminal_modes): Ditto.

src/term.c (Vsuspend_tty_functions, Vresume_tty_functions): New hooks.
(syms_of_term): Defvar them.
(term_init): Don't allow opening a new frame on a suspended tty device.
(Fsuspend_tty, Fresume_tty): New functions.
(syms_of_term): Defsubr them.

src/termchar.c (struct tty_display_info): Update documentation of
input and output.
(TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT): Removed.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-105
2004-02-28 01:23:39 +00:00
Karoly Lorentey
2fc0cf2aef Make emacsclient refuse to create a frame inside an Emacs term buffer.
lib-src/emacsclient.c (main): Exit with failure if the terminal type
is `eterm' (Emacs term buffer).

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-104
2004-02-27 14:10:47 +00:00
Karoly Lorentey
f70dd00951 README.multi-tty updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-103
2004-02-27 14:05:11 +00:00
Karoly Lorentey
01d81f75b9 README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-95
2004-02-25 00:53:40 +00:00
Karoly Lorentey
aaaf7fe167 README updates.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-86
2004-02-20 03:02:04 +00:00
Karoly Lorentey
e5299d8d65 Changed emacsclient to open new frames by default.
lib-src/emacsclient.c (decode_options): Handle the case when $DISPLAY
is an empty string.  Set window_system or tty to one by default,
depending on if there is a valid display.
(longopts, decode_options, print_help_and_exit): Removed -w, added -c.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-85
2004-02-20 01:46:26 +00:00
Karoly Lorentey
806c1866e6 Fixed a typo in README.multi-tty.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-76
2004-02-10 13:52:03 +00:00
Karoly Lorentey
4edd8a5c90 Don't hang on the tty if called from a shell script.
src/sysdep.c (narrow_foreground_group): Set the process group to
inherited_pgroup before calling EMACS_SET_TTY_PGRP.  Removed confusing
inherited_pgroup initialization (it is done in emacs.c).  (Reported by
Istvan Marko <mi-mtty at kismala dot com>.)

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-75
2004-02-08 15:44:33 +00:00
Karoly Lorentey
0c72d684c4 Fix the case when emacsclient is run on Emacs's controlling tty.
src/term.c (O_NOCTTY): Make sure it's defined.
(no_controlling_tty): New variable.
(init_initial_display, mark_ttys): Remove unused variable.
(term_init): Check that the given filename is a terminal device.
Dissociate the controlling terminal if we reopen it for other purposes.
(Reported by Dan Nicolaescu <dann at ics dot uci dot edu>.
(Fdelete_tty): Return nil.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-72
2004-02-02 22:09:56 +00:00
Karoly Lorentey
bacb668905 Don't exit Emacs when the X display is closed during a tty-X combo session.
src/xterm.c (x_delete_display): Fix semantic typo.
(x_connection_closed): When deciding whether or not to shut down
Emacs, check for remaining elements in display_list, not
x_display_list.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-68
2004-01-26 07:17:34 +00:00
Karoly Lorentey
3bbdbec9f2 Fixed interactive temacs.
src/xdisp.c (init_iterator): Always initialize the face cache if it's NULL.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-64
2004-01-24 20:03:33 +00:00
Karoly Lorentey
2441679b4c Set the keyboard of the initial frame correctly.
src/dispnew.c (init_display)[MULTI_KBOARD]: Change the kboard of the
initial frame to that of the tty.  (Fixes --eval bug reported by
Romain Francoise.)


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-63
2004-01-24 19:32:29 +00:00
Karoly Lorentey
d448e98221 Fixed tty faces during combo sessions. Plus other assorted bugfixes.
lisp/startup.el (command-line): Always call tty-register-default-colors.

src/dispextern.h (delete_tty): Added missing prototype.

src/keyboard.c (read_avail_input): Close display gracefully if needed.
Kill Emacs if the last display is to be closed.
(tty_read_avail_input): Don't call delete_tty and don't signal hangup here;
return -2 instead to indicate the non-transient failure to read_avail_input.

src/term.c (delete_tty): Removed superflous wiping of the deleted
frames' output_data field.
(delete_display): Check for and close live frames that are still on the display.
src/termhooks.h (read_socket_hook, delete_display_hook): Added detailed comment.
src/xfaces.c (realize_face): Create a dummy face for the initial frame.
(Reported by Robert J. Chassell (bob at rattlenake dot com).)

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-61
2004-01-23 21:48:58 +00:00
Karoly Lorentey
6c3d443b13 Added note about the commit mailing list.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-60
2004-01-22 19:39:51 +00:00
Karoly Lorentey
e9cda82776 Romain Francoise's and Ami Fischman's bugfixes.
src/term.c (create_tty_output): Fix syntax error.  Reported by Ami
Fischman (ami at fischman dot org).

lisp/loadup.el: Load term/x-win.el if X is available.

lisp/startup.el (handle-args-function-alist)
(window-system-initialization-alist): New variables.
(command-line): Don't load term/x-win.el, use the above variables.

lisp/x-win.el: (x-initialize-window-system): New function, move X
initialization here.
(x-initialized): New variable.

lisp/frame.el (make-frame-on-display): Don't initialize X twice, and
make sure to pass the correct display parameter to x-open-connection.
Reported by Romain Francoise (romain at orebokech dot com).

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-58
2004-01-22 02:36:55 +00:00
Karoly Lorentey
2246281fb0 Support for opening X frames from a tty session.
lisp/cus-face.el (custom-declare-face): Handle multiple concurrent
display methods correctly.

lisp/faces.el (x-create-frame-with-faces): Set the window-system frame
parameter instead of frame-creation-function.
(tty-create-frame-with-faces): Ditto.

lisp/frame.el (frame-creation-function): Removed.
(frame-creation-function-alist): New variable.
(frame-initialize): Use initial-window-system instead of window-system.
Add window-system parameter to initial-frame-alist.
Removed tty initialization, it was moved to frame-creation-function-alist.
(frame-notice-user-settings): Use initial-window-system instead of window-system.
(make-frame-on-display): Make sure term/x-win is loaded.  Added
window-system parameter for make-frame.
(make-frame-on-tty): Removed unnecessary autoload declaration.  Added
window-system parameter for make-frame.
(make-frame): Use frame-creation-function-alist to determine the
function to use depending on the specified window system.
(select-frame-by-name): Use the window-system function instead of the
variable.

lisp/startup.el (window-system):  New variable (previously built-in,
now frame-local).
(normal-top-level, command-line): Use initial-window-system instead
of window-system.

lisp/loadup.el:  Load startup.el before faces.el, for the
window-system variable.

lisp/term/x-win.el: Check for the x-create-frame function instead of
window-system to see if X is available.  Don't exit Emacs if the
display can not be opened when X is not the initial display method.
Set up frame-creation-function-alist instead of
frame-creation-function.  Provide the x-win feature.

src/dispnew.c (Vwindow_system): Renamed to Vinitial_window_system.
(init_display, syms_of_display): Updated to use Vinitial_window_system
instead of Vwindow_system.

src/emacs.c (shut_down_emacs): Updated to use Vinitial_window_system
instead of Vwindow_system.

src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes, not
reset_sys_modes.  Ditto for init_all_sys_modes.  Process the quit
parameter correctly.

src/sysdep.c (init_sys_modes, reset_sys_modes): Unconditionally set up
the terminal.  We don't get called if there is nothing to do anymore.
(sys_select): Use Vinitial_window_system, not Vwindow_system.

src/window.h (Vwindow_system): Renamed to Vinitial_window_system.

src/xfns.c (Fx_create_frame): Don't check_x.  We initialize it anyway.
(x_display_info_for_name, Fx_open_connection): Don't look at
Vinitial_window_system.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-54
2004-01-11 21:59:40 +00:00
Karoly Lorentey
c0707982ab Don't select on stdin unconditionally.
src/process.c (init_process): Don't add stdin to input_wait_mask.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-53
2004-01-11 11:26:00 +00:00
Karoly Lorentey
4ca927b4e0 Fix C-g handling with multiple ttys.
src/sysdep.c (init_sys_modes): Disable interrupt and quit keys on
secondary terminals.  Added a big fat comment about this.

lib-src/emacsclient.c (init_signals): Don't pass SIGINT and SIGQUIT to Emacs.

src/keyboard.c (interrupt_signal): Exit Emacs if there are no frames
on the controlling tty.  Otherwise set internal_last_event_frame to
the controlling tty's top frame.

src/term.c (ring_bell, tty_ring_bell): Don't look at updating_frame.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-52
2004-01-11 02:45:44 +00:00
Karoly Lorentey
114a8b8cab Numerous bugfixes and small improvements.
lisp/bindings.el (mode-line-frame-identification): Use %T, not %F.

lisp/faces.el (x-create-frame-with-faces): Added
frame-creation-function parameter.
(tty-create-frame-with-faces): Ditto.

lisp/frame.el (frame-creation-function): Make it frame-local.
(select-frame-set-input-focus): Use the window-system function, not
the variable.

lisp/server.el (server-handle-delete-tty): Make sure the client
process is removed from server-clients after the delete-process call.
It seems that the sentinel is not called.  Added docs.
(server-process-filter): Immediately add the client to server-clients
when a new termcap frame is created.  Fixed a case of `not' called
with two parameters.  Ignore errors while sending the evaluation
result back to the client.
(server-kill-buffer-query-function): Don't ask the user if the server
process is already dead.

lisp/term/x-win.el: Don't change mode-line-frame-identification.

src/buffer.c (syms_of_buffer): Added %T to the docs of mode-line-format.

src/dispnew.c (init_display): Increment the reference count of the new
termcap display.

src/frame.c (make_terminal_frame): Set the old top frame's visibility
to `obscured'.
(Fmake_terminal_frame): Look at the current termcap display's name,
not just the similar frame parameter.  Try to get the type from the
current display first, and only then from Vdefault_frame_alist.

src/keyboard.c (handle_interrupt): New function to separate the signal
handling from C-g processing.
(interrupt_signal): Call handle_interrupt to do the real work.
(kbd_buffer_store_event): Use handle_interrupt instead of interrupt_signal.
(cmd_error_internal): Use FRAME_INITIAL_P instead of ugly hacks.

src/termhooks.h (initial_display): New declaration.

src/xdisp.c (decode_mode_spec): Added '%T' (termcap-only frame name).

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-49
2004-01-10 12:56:22 +00:00
Karoly Lorentey
3224dac1b8 Hookified termcap devices, added bootstrap display device, plus many bugfixes.
lisp/frame.el (display-color-cells): Pass display parameter to tty-display-color-cells.

lisp/term/xterm.el (xterm-register-default-colors): Pass the selected-frame to display-color-cells.

src/dispextern.h (set_terminal_modes, reset_terminal_modes): Removed declarations.
(get_named_tty_display): New prototype.
(tty_clear_end_of_line, term_init): Updated to new prototype.
(initial_term_init): Renamed to init_initial_display.

src/dispnew.c (Fredraw_frame): ifdef-out DOS-specific code.  Add display parameter to set_terminal_modes call.
(update_frame): Don't flush the tty of there is no tty.
(init_display): Set up a termcap display on the controlling tty and
change the initial frame to use that.  Delete the initial display.

src/frame.c (Fframep): Return t for the initial frame.
(make_initial_frame): New function for creating the initial frame during bootstrap.  Use init_initial_display, not initial_term_init.
(make_terminal_frame): Removed special cases for creating the initial frame.

src/frame.h (enum output_method): New entry: output_initial for the bootstrap display.
(FRAME_INITIAL_P): New macro.
(make_initial_frame): New prototype.

src/keyboard.c (interrupt_signal): Exit Emacs on SIGINT from the (frameless) controlling tty, if possible.  Explain this in a comment.
(init_keyboard): Added comment about exiting on SIGINT.
(Fset_input_mode): A termcap frame is never the initial frame anymore.

src/sysdep.c (init_sys_modes): Update tty_set_terminal_modes call to the new prototype.
(reset_sys_modes): Comment out tty_clear_end_of_line call; it doesn't work anymore.  Update tty_reset_terminal_modes call.

src/termchar.h (struct tty_display_info): Added pointer to the display structure, for reset_sys_modes.

src/termhooks.h (struct display): Added display parameter to set_terminal_modes_hook and reset_terminal_modes_hook.

src/term.c (initial_display): New variable.
(tty_ring_bell, tty_update_end, tty_set_terminal_window, tty_cursor_to)
(tty_raw_cursor_to, tty_clear_to_end, tty_clear_frame, tty_clear_end_of_line)
(tty_write_glyphs, tty_insert_glyphs, tty_delete_glyphs, tty_ins_del_lines): New functions.
(ring_bell, update_end, set_terminal_window, cursor_to, raw_cursor_to)
(clear_to_end, clear_frame, clear_end_of_line, write_glyphs, insert_glyphs)
(delete_glyphs, ins_del_lines): Removed special casing of termcap displays.
(get_tty_display): New function.
(Ftty_display_color_p, Ftty_display_color_cells): Use it.
(get_named_tty_display): Removed static.
(tty_set_terminal_modes, tty_reset_terminal_modes): Changed to use a display parameter
instead of tty_display_info for hook compatibility.
(set_terminal_modes, reset_terminal_modes): Removed.
(initial_term_init): Renamed to init_initial_display.  Set up an
output_initial device, not a termcap display.
(delete_initial_display): New function.
(maybe_fatal): New function, for private use of term_init.
(term_init): New parameter for choosing between fatal and simple errors.
Removed incomprehensible special casing for the second initialization of the
controlling tty.  Use maybe_fatal for error handling.
Initialize termcap display hooks in the new device.
Initialize the display pointer in the tty_display_info structure.
(delete_tty): Replace order of reset_sys_modes and delete_display.

src/window.c (init_window_once): Call make_initial_frame instead of make_terminal_frame.

src/xfaces.c (realize_default_face, realize_face): Don't abort on the bootstrap display device.

src/xterm.c (XTset_terminal_modes, XTreset_terminal_modes): Added display parameter.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-48
2004-01-09 18:57:53 +00:00