changeset 30446:e3fe041c4e25

(window_display_table): Cleaned up.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 25 Jul 2000 12:05:45 +0000
parents 507cbd3f9296
children e60d22cf57b4
files src/window.c
diffstat 1 files changed, 15 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Tue Jul 25 10:53:06 2000 +0000
+++ b/src/window.c	Tue Jul 25 12:05:45 2000 +0000
@@ -895,20 +895,21 @@
 window_display_table (w)
      struct window *w;
 {
-  Lisp_Object tem;
-  tem = w->display_table;
-  if (DISP_TABLE_P (tem))
-    return XCHAR_TABLE (tem);
-  if (NILP (w->buffer))
-    return 0;
-
-  tem = XBUFFER (w->buffer)->display_table;
-  if (DISP_TABLE_P (tem))
-    return XCHAR_TABLE (tem);
-  tem = Vstandard_display_table;
-  if (DISP_TABLE_P (tem))
-    return XCHAR_TABLE (tem);
-  return 0;
+  struct Lisp_Char_Table *dp = NULL;
+
+  if (DISP_TABLE_P (w->display_table))
+    dp = XCHAR_TABLE (w->display_table);
+  else if (BUFFERP (w->buffer))
+    {
+      struct buffer *b = XBUFFER (w->buffer);
+      
+      if (DISP_TABLE_P (b->display_table))
+	dp = XCHAR_TABLE (b->display_table);
+      else if (DISP_TABLE_P (Vstandard_display_table))
+	dp = XCHAR_TABLE (Vstandard_display_table);
+    }
+
+  return dp;
 }
 
 DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_display_table, 2, 2, 0,