Mercurial > emacs
comparison src/window.c @ 30446:e3fe041c4e25
(window_display_table): Cleaned up.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 25 Jul 2000 12:05:45 +0000 |
parents | 8dd313fc287d |
children | e4ba830b426d |
comparison
equal
deleted
inserted
replaced
30445:507cbd3f9296 | 30446:e3fe041c4e25 |
---|---|
893 | 893 |
894 struct Lisp_Char_Table * | 894 struct Lisp_Char_Table * |
895 window_display_table (w) | 895 window_display_table (w) |
896 struct window *w; | 896 struct window *w; |
897 { | 897 { |
898 Lisp_Object tem; | 898 struct Lisp_Char_Table *dp = NULL; |
899 tem = w->display_table; | 899 |
900 if (DISP_TABLE_P (tem)) | 900 if (DISP_TABLE_P (w->display_table)) |
901 return XCHAR_TABLE (tem); | 901 dp = XCHAR_TABLE (w->display_table); |
902 if (NILP (w->buffer)) | 902 else if (BUFFERP (w->buffer)) |
903 return 0; | 903 { |
904 | 904 struct buffer *b = XBUFFER (w->buffer); |
905 tem = XBUFFER (w->buffer)->display_table; | 905 |
906 if (DISP_TABLE_P (tem)) | 906 if (DISP_TABLE_P (b->display_table)) |
907 return XCHAR_TABLE (tem); | 907 dp = XCHAR_TABLE (b->display_table); |
908 tem = Vstandard_display_table; | 908 else if (DISP_TABLE_P (Vstandard_display_table)) |
909 if (DISP_TABLE_P (tem)) | 909 dp = XCHAR_TABLE (Vstandard_display_table); |
910 return XCHAR_TABLE (tem); | 910 } |
911 return 0; | 911 |
912 return dp; | |
912 } | 913 } |
913 | 914 |
914 DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_display_table, 2, 2, 0, | 915 DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_display_table, 2, 2, 0, |
915 "Set WINDOW's display-table to TABLE.") | 916 "Set WINDOW's display-table to TABLE.") |
916 (window, table) | 917 (window, table) |