From 51c4025fa5064e0db4344a1421fcf1739671675a Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 2 Jul 1997 12:53:57 +0000 Subject: [PATCH] (Fchar_width): Check if the current buffer has display table. --- src/charset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/charset.c b/src/charset.c index 9ba1143baf9..2e30fcc67a6 100644 --- a/src/charset.c +++ b/src/charset.c @@ -747,13 +747,14 @@ The width is measured by how many columns it occupies on the screen.") { Lisp_Object val, disp; int c; + struct Lisp_Char_Table *dp = buffer_display_table (); CHECK_NUMBER (ch, 0); c = XINT (ch); /* Get the way the display table would display it. */ - disp = DISP_CHAR_VECTOR (buffer_display_table (current_buffer), (c)); + disp = dp ? DISP_CHAR_VECTOR (dp, c) : Qnil; if (VECTORP (disp)) XSETINT (val, XVECTOR (disp)->size); -- 2.39.2