aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Marshall1995-12-12 08:20:37 +0000
committerSimon Marshall1995-12-12 08:20:37 +0000
commitb7ffee5fb7516668d653545602266dd5102a0f75 (patch)
tree394b0da68bb46abb5910b4b373d789169f48d5b3
parent7d826aa9d2dd71bd9f944eed1605388c391f2fd4 (diff)
downloademacs-b7ffee5fb7516668d653545602266dd5102a0f75.tar.gz
emacs-b7ffee5fb7516668d653545602266dd5102a0f75.zip
Wrap case-fold-search for x-frob-font-weight and x-frob-font-slant.
-rw-r--r--lisp/faces.el60
1 files changed, 32 insertions, 28 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index b4071cd4797..2f8e3d9b3ec 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -629,36 +629,40 @@ also the same size as FACE on FRAME, or fail."
629 (cdr (assq 'font (frame-parameters (selected-frame)))))) 629 (cdr (assq 'font (frame-parameters (selected-frame))))))
630 630
631(defun x-frob-font-weight (font which) 631(defun x-frob-font-weight (font which)
632 (cond ((string-match x-font-regexp font) 632 (let ((case-fold-search t))
633 (concat (substring font 0 (match-beginning x-font-regexp-weight-subnum)) 633 (cond ((string-match x-font-regexp font)
634 which 634 (concat (substring font 0
635 (substring font (match-end x-font-regexp-weight-subnum) 635 (match-beginning x-font-regexp-weight-subnum))
636 (match-beginning x-font-regexp-adstyle-subnum)) 636 which
637 ;; Replace the ADD_STYLE_NAME field with * 637 (substring font (match-end x-font-regexp-weight-subnum)
638 ;; because the info in it may not be the same 638 (match-beginning x-font-regexp-adstyle-subnum))
639 ;; for related fonts. 639 ;; Replace the ADD_STYLE_NAME field with *
640 "*" 640 ;; because the info in it may not be the same
641 (substring font (match-end x-font-regexp-adstyle-subnum)))) 641 ;; for related fonts.
642 ((or (string-match x-font-regexp-head font) 642 "*"
643 (string-match x-font-regexp-weight font)) 643 (substring font (match-end x-font-regexp-adstyle-subnum))))
644 (concat (substring font 0 (match-beginning 1)) which 644 ((or (string-match x-font-regexp-head font)
645 (substring font (match-end 1)))))) 645 (string-match x-font-regexp-weight font))
646 (concat (substring font 0 (match-beginning 1)) which
647 (substring font (match-end 1)))))))
646 648
647(defun x-frob-font-slant (font which) 649(defun x-frob-font-slant (font which)
648 (cond ((string-match x-font-regexp font) 650 (let ((case-fold-search t))
649 (concat (substring font 0 (match-beginning x-font-regexp-slant-subnum)) 651 (cond ((string-match x-font-regexp font)
650 which 652 (concat (substring font 0
651 (substring font (match-end x-font-regexp-slant-subnum) 653 (match-beginning x-font-regexp-slant-subnum))
652 (match-beginning x-font-regexp-adstyle-subnum)) 654 which
653 ;; Replace the ADD_STYLE_NAME field with * 655 (substring font (match-end x-font-regexp-slant-subnum)
654 ;; because the info in it may not be the same 656 (match-beginning x-font-regexp-adstyle-subnum))
655 ;; for related fonts. 657 ;; Replace the ADD_STYLE_NAME field with *
656 "*" 658 ;; because the info in it may not be the same
657 (substring font (match-end x-font-regexp-adstyle-subnum)))) 659 ;; for related fonts.
658 ((or (string-match x-font-regexp-head font) 660 "*"
659 (string-match x-font-regexp-slant font)) 661 (substring font (match-end x-font-regexp-adstyle-subnum))))
660 (concat (substring font 0 (match-beginning 1)) which 662 ((or (string-match x-font-regexp-head font)
661 (substring font (match-end 1)))))) 663 (string-match x-font-regexp-slant font))
664 (concat (substring font 0 (match-beginning 1)) which
665 (substring font (match-end 1)))))))
662 666
663(defun x-make-font-bold (font) 667(defun x-make-font-bold (font)
664 "Given an X font specification, make a bold version of it. 668 "Given an X font specification, make a bold version of it.