diff options
| author | Stefan Monnier | 2009-09-03 00:36:11 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-09-03 00:36:11 +0000 |
| commit | 7cef7ce343169850e48de169cf702a0b87886e6a (patch) | |
| tree | a2bff1885bc62a1784feb9a32d62e387de2498b6 | |
| parent | a54fa5b720201e4717d0177821b8defcdad3d916 (diff) | |
| download | emacs-7cef7ce343169850e48de169cf702a0b87886e6a.tar.gz emacs-7cef7ce343169850e48de169cf702a0b87886e6a.zip | |
(Fsend_string_to_terminal): Make it work again on the initial terminal as well.
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/dispnew.c | 30 |
2 files changed, 25 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9dd82c590f8..b8d21c5028a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,7 +1,12 @@ | |||
| 1 | 2009-09-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * dispnew.c (Fsend_string_to_terminal): Make it work again on the | ||
| 4 | initial terminal as well. | ||
| 5 | |||
| 1 | 2009-09-02 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2009-09-02 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * xterm.h: Rename x_non_menubar_window_to_frame to | 8 | * xterm.h: Rename x_non_menubar_window_to_frame to |
| 4 | x_menubar_window_to_frame | 9 | x_menubar_window_to_frame. |
| 5 | 10 | ||
| 6 | * xterm.c: Remove declarations also in xterm.h | 11 | * xterm.c: Remove declarations also in xterm.h |
| 7 | (XTmouse_position): Do not return valid positions | 12 | (XTmouse_position): Do not return valid positions |
diff --git a/src/dispnew.c b/src/dispnew.c index 5236d53c01e..22a876c8d17 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -6475,8 +6475,8 @@ currently selected frame. */) | |||
| 6475 | Lisp_Object string; | 6475 | Lisp_Object string; |
| 6476 | Lisp_Object terminal; | 6476 | Lisp_Object terminal; |
| 6477 | { | 6477 | { |
| 6478 | struct terminal *t = get_tty_terminal (terminal, 1); | 6478 | struct terminal *t = get_terminal (terminal, 1); |
| 6479 | struct tty_display_info *tty; | 6479 | FILE *out; |
| 6480 | 6480 | ||
| 6481 | /* ??? Perhaps we should do something special for multibyte strings here. */ | 6481 | /* ??? Perhaps we should do something special for multibyte strings here. */ |
| 6482 | CHECK_STRING (string); | 6482 | CHECK_STRING (string); |
| @@ -6485,18 +6485,26 @@ currently selected frame. */) | |||
| 6485 | if (!t) | 6485 | if (!t) |
| 6486 | error ("Unknown terminal device"); | 6486 | error ("Unknown terminal device"); |
| 6487 | 6487 | ||
| 6488 | tty = t->display_info.tty; | 6488 | if (t->type == output_initial) |
| 6489 | out = stdout; | ||
| 6490 | else if (t->type != output_termcap && t->type != output_msdos_raw) | ||
| 6491 | error ("Device %d is not a termcap terminal device", t->id); | ||
| 6492 | else | ||
| 6493 | { | ||
| 6494 | struct tty_display_info *tty = t->display_info.tty; | ||
| 6489 | 6495 | ||
| 6490 | if (! tty->output) | 6496 | if (! tty->output) |
| 6491 | error ("Terminal is currently suspended"); | 6497 | error ("Terminal is currently suspended"); |
| 6492 | 6498 | ||
| 6493 | if (tty->termscript) | 6499 | if (tty->termscript) |
| 6494 | { | 6500 | { |
| 6495 | fwrite (SDATA (string), 1, SBYTES (string), tty->termscript); | 6501 | fwrite (SDATA (string), 1, SBYTES (string), tty->termscript); |
| 6496 | fflush (tty->termscript); | 6502 | fflush (tty->termscript); |
| 6503 | } | ||
| 6504 | out = tty->output; | ||
| 6497 | } | 6505 | } |
| 6498 | fwrite (SDATA (string), 1, SBYTES (string), tty->output); | 6506 | fwrite (SDATA (string), 1, SBYTES (string), out); |
| 6499 | fflush (tty->output); | 6507 | fflush (out); |
| 6500 | UNBLOCK_INPUT; | 6508 | UNBLOCK_INPUT; |
| 6501 | return Qnil; | 6509 | return Qnil; |
| 6502 | } | 6510 | } |