From 528fbf51268d26a0b11e28bb7599f6f6499575a5 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 25 Mar 1996 15:09:27 +0000 Subject: [PATCH] (x-frob-font-slant): Properly handle a match against x-font-regexp-head. (x-frob-font-weight): Separate two cond cases by analogy with x-frob-font-slant. --- lisp/faces.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index 93c4ec5ce25..6489bbcfaa7 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -660,8 +660,10 @@ also the same size as FACE on FRAME, or fail." ;; for related fonts. "*" (substring font (match-end x-font-regexp-adstyle-subnum)))) - ((or (string-match x-font-regexp-head font) - (string-match x-font-regexp-weight font)) + ((string-match x-font-regexp-head font) + (concat (substring font 0 (match-beginning 1)) which + (substring font (match-end 1)))) + ((string-match x-font-regexp-weight font) (concat (substring font 0 (match-beginning 1)) which (substring font (match-end 1))))))) @@ -678,8 +680,10 @@ also the same size as FACE on FRAME, or fail." ;; for related fonts. "*" (substring font (match-end x-font-regexp-adstyle-subnum)))) - ((or (string-match x-font-regexp-head font) - (string-match x-font-regexp-slant font)) + ((string-match x-font-regexp-head font) + (concat (substring font 0 (match-beginning 2)) which + (substring font (match-end 2)))) + ((string-match x-font-regexp-slant font) (concat (substring font 0 (match-beginning 1)) which (substring font (match-end 1))))))) -- 2.39.2