From c756cdbeb3f4de6e9b51602e78e2dc9119733a18 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 25 Jul 2000 12:05:45 +0000 Subject: [PATCH] (window_display_table): Cleaned up. --- src/window.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/window.c b/src/window.c index 541da41aec8..b90d8b40806 100644 --- a/src/window.c +++ b/src/window.c @@ -895,20 +895,21 @@ struct Lisp_Char_Table * 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; + 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); + } - 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; + return dp; } DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_display_table, 2, 2, 0, -- 2.39.2