Mercurial > emacs
comparison lisp/faces.el @ 14880:b405f39b5493
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 25 Mar 1996 15:09:27 +0000 |
parents | 11a297676bda |
children | db0f45c7f885 |
comparison
equal
deleted
inserted
replaced
14879:70f79ccb9875 | 14880:b405f39b5493 |
---|---|
658 ;; Replace the ADD_STYLE_NAME field with * | 658 ;; Replace the ADD_STYLE_NAME field with * |
659 ;; because the info in it may not be the same | 659 ;; because the info in it may not be the same |
660 ;; for related fonts. | 660 ;; for related fonts. |
661 "*" | 661 "*" |
662 (substring font (match-end x-font-regexp-adstyle-subnum)))) | 662 (substring font (match-end x-font-regexp-adstyle-subnum)))) |
663 ((or (string-match x-font-regexp-head font) | 663 ((string-match x-font-regexp-head font) |
664 (string-match x-font-regexp-weight font)) | 664 (concat (substring font 0 (match-beginning 1)) which |
665 (substring font (match-end 1)))) | |
666 ((string-match x-font-regexp-weight font) | |
665 (concat (substring font 0 (match-beginning 1)) which | 667 (concat (substring font 0 (match-beginning 1)) which |
666 (substring font (match-end 1))))))) | 668 (substring font (match-end 1))))))) |
667 | 669 |
668 (defun x-frob-font-slant (font which) | 670 (defun x-frob-font-slant (font which) |
669 (let ((case-fold-search t)) | 671 (let ((case-fold-search t)) |
676 ;; Replace the ADD_STYLE_NAME field with * | 678 ;; Replace the ADD_STYLE_NAME field with * |
677 ;; because the info in it may not be the same | 679 ;; because the info in it may not be the same |
678 ;; for related fonts. | 680 ;; for related fonts. |
679 "*" | 681 "*" |
680 (substring font (match-end x-font-regexp-adstyle-subnum)))) | 682 (substring font (match-end x-font-regexp-adstyle-subnum)))) |
681 ((or (string-match x-font-regexp-head font) | 683 ((string-match x-font-regexp-head font) |
682 (string-match x-font-regexp-slant font)) | 684 (concat (substring font 0 (match-beginning 2)) which |
685 (substring font (match-end 2)))) | |
686 ((string-match x-font-regexp-slant font) | |
683 (concat (substring font 0 (match-beginning 1)) which | 687 (concat (substring font 0 (match-beginning 1)) which |
684 (substring font (match-end 1))))))) | 688 (substring font (match-end 1))))))) |
685 | 689 |
686 (defun x-make-font-bold (font) | 690 (defun x-make-font-bold (font) |
687 "Given an X font specification, make a bold version of it. | 691 "Given an X font specification, make a bold version of it. |