summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marshall <simon@gnu.org>1995-12-12 08:20:37 +0000
committerSimon Marshall <simon@gnu.org>1995-12-12 08:20:37 +0000
commit54f7a3d00b7b05a20f955f1db50171625f9ebc2e (patch)
treee5840b379be4624a5662e26fa85100ac419722d8
parent3f9a8915b5d0b3abb3354f32cdebf2b4eaee5fd1 (diff)
downloademacs-54f7a3d00b7b05a20f955f1db50171625f9ebc2e.tar.gz
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."
(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.