From: Chong Yidong Date: Tue, 14 Oct 2008 14:41:20 +0000 (+0000) Subject: (font_clear_prop): When clearing font width, clear the average width X-Git-Tag: emacs-pretest-23.0.90~2481 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e234927a7eac7232d837574ba30aa20bbc539f29;p=emacs.git (font_clear_prop): When clearing font width, clear the average width field too. --- diff --git a/src/font.c b/src/font.c index f299435e84e..a9ddd8353a5 100644 --- a/src/font.c +++ b/src/font.c @@ -2996,7 +2996,9 @@ font_clear_prop (attrs, prop) if (! FONTP (font)) return; if (NILP (AREF (font, prop)) - && prop != FONT_FAMILY_INDEX && prop != FONT_FOUNDRY_INDEX + && prop != FONT_FAMILY_INDEX + && prop != FONT_FOUNDRY_INDEX + && prop != FONT_WIDTH_INDEX && prop != FONT_SIZE_INDEX) return; font = Fcopy_font_spec (font); @@ -3018,6 +3020,8 @@ font_clear_prop (attrs, prop) ASET (font, FONT_SPACING_INDEX, Qnil); ASET (font, FONT_AVGWIDTH_INDEX, Qnil); } + else if (prop == FONT_WIDTH_INDEX) + ASET (font, FONT_AVGWIDTH_INDEX, Qnil); attrs[LFACE_FONT_INDEX] = font; }