]> code.delx.au - gnu-emacs/commitdiff
Fix list-colors-display and other functions on a termcap frame
authorKaroly Lorentey <lorentey@elte.hu>
Thu, 19 Feb 2004 02:27:31 +0000 (02:27 +0000)
committerKaroly Lorentey <lorentey@elte.hu>
Thu, 19 Feb 2004 02:27:31 +0000 (02:27 +0000)
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

src/term.c

index ddca41f31731fb9a533c759c4eefc73498439fe1..b345211b91c9bd0253ad251b68026afc0eb8bf44 100644 (file)
@@ -1882,14 +1882,18 @@ tty_capable_p (tty, caps, fg, bg)
   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;