# HG changeset patch # User Simon Marshall # Date 818756437 0 # Node ID 3dcaddea344a9cbb6205b5d372710c227e2d1378 # Parent a185c48f6b610807e8da7fcc7ceb9ceef80b6346 Wrap case-fold-search for x-frob-font-weight and x-frob-font-slant. diff -r a185c48f6b61 -r 3dcaddea344a lisp/faces.el --- a/lisp/faces.el Tue Dec 12 00:47:21 1995 +0000 +++ b/lisp/faces.el Tue Dec 12 08:20:37 1995 +0000 @@ -629,36 +629,40 @@ (cdr (assq 'font (frame-parameters (selected-frame)))))) (defun x-frob-font-weight (font which) - (cond ((string-match x-font-regexp font) - (concat (substring font 0 (match-beginning x-font-regexp-weight-subnum)) - which - (substring font (match-end x-font-regexp-weight-subnum) - (match-beginning x-font-regexp-adstyle-subnum)) - ;; Replace the ADD_STYLE_NAME field with * - ;; because the info in it may not be the same - ;; 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)) - (concat (substring font 0 (match-beginning 1)) which - (substring font (match-end 1)))))) + (let ((case-fold-search t)) + (cond ((string-match x-font-regexp font) + (concat (substring font 0 + (match-beginning x-font-regexp-weight-subnum)) + which + (substring font (match-end x-font-regexp-weight-subnum) + (match-beginning x-font-regexp-adstyle-subnum)) + ;; Replace the ADD_STYLE_NAME field with * + ;; because the info in it may not be the same + ;; 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)) + (concat (substring font 0 (match-beginning 1)) which + (substring font (match-end 1))))))) (defun x-frob-font-slant (font which) - (cond ((string-match x-font-regexp font) - (concat (substring font 0 (match-beginning x-font-regexp-slant-subnum)) - which - (substring font (match-end x-font-regexp-slant-subnum) - (match-beginning x-font-regexp-adstyle-subnum)) - ;; Replace the ADD_STYLE_NAME field with * - ;; because the info in it may not be the same - ;; 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)) - (concat (substring font 0 (match-beginning 1)) which - (substring font (match-end 1)))))) + (let ((case-fold-search t)) + (cond ((string-match x-font-regexp font) + (concat (substring font 0 + (match-beginning x-font-regexp-slant-subnum)) + which + (substring font (match-end x-font-regexp-slant-subnum) + (match-beginning x-font-regexp-adstyle-subnum)) + ;; Replace the ADD_STYLE_NAME field with * + ;; because the info in it may not be the same + ;; 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)) + (concat (substring font 0 (match-beginning 1)) which + (substring font (match-end 1))))))) (defun x-make-font-bold (font) "Given an X font specification, make a bold version of it.