[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lib-src/emacsclient.c,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lib-src/emacsclient.c,v |
Date: |
Sat, 01 Nov 2008 13:48:56 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 08/11/01 13:48:55
Index: emacsclient.c
===================================================================
RCS file: /cvsroot/emacs/emacs/lib-src/emacsclient.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -b -r1.137 -r1.138
--- emacsclient.c 31 Oct 2008 23:17:14 -0000 1.137
+++ emacsclient.c 1 Nov 2008 13:48:55 -0000 1.138
@@ -353,8 +353,13 @@
if (! (value = w32_get_resource (HKEY_CURRENT_USER, envvar, &dwType)) &&
! (value = w32_get_resource (HKEY_LOCAL_MACHINE, envvar, &dwType)))
- /* Not found in the registry. */
+ {
+ /* "w32console" is what Emacs on Windows uses for tty-type under -nw. */
+ if (strcmp (envvar, "TERM") == 0)
+ return xstrdup ("w32console");
+ /* Found neither in the environment nor in the registry. */
return NULL;
+ }
if (dwType == REG_SZ)
/* Registry; no need to expand. */
@@ -435,6 +440,13 @@
#undef execvp
#define execvp w32_execvp
+/* Emulation of ttyname for Windows. */
+char *
+ttyname (int fd)
+{
+ return "CONOUT$";
+}
+
#endif /* WINDOWSNT */
/* Display a normal or error message.
@@ -570,10 +582,8 @@
if (!tty && display)
window_system = 1;
-#if !defined (WINDOWSNT)
else if (!current_frame)
tty = 1;
-#endif
/* --no-wait implies --current-frame on ttys when there are file
arguments or expressions given. */
@@ -1444,9 +1454,8 @@
{
char *type = egetenv ("TERM");
char *tty_name = NULL;
-#ifndef WINDOWSNT
+
tty_name = ttyname (fileno (stdout));
-#endif
if (! tty_name)
{
- [Emacs-diffs] Changes to emacs/lib-src/emacsclient.c,v,
Eli Zaretskii <=