changeset 83041:94b1d2cd8189

Fix list-colors-display and other functions on a termcap frame src/term.c (get_tty_display): Fall back to the current device if display is nil. (Reported by Dan Nicolaescu <dann at ics dot uci dot edu>.) git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-81
author Karoly Lorentey <lorentey@elte.hu>
date Thu, 19 Feb 2004 02:27:31 +0000
parents b0da1c792c48
children 968e8c7ff1f4
files src/term.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c	Thu Feb 19 02:10:05 2004 +0000
+++ b/src/term.c	Thu Feb 19 02:27:31 2004 +0000
@@ -1882,14 +1882,18 @@
   return 1;
 }
 
-/* Return the tty display object specified by DISPLAY.
-   DISPLAY may be a frame or a string. */
+/* Return the tty display object specified by DISPLAY.  DISPLAY may be
+   a frame, a string, or nil for the display device of the current
+   frame. */
 
 static struct display *
 get_tty_display (Lisp_Object display)
 {
   struct display *d;
 
+  if (NILP (display))
+    display = selected_frame;
+
   if (! FRAMEP (display) && ! STRINGP (display))
     return 0;