diff options
| author | Richard M. Stallman | 1993-11-27 07:52:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-27 07:52:47 +0000 |
| commit | 534dbc9764c4254a2e1d36e78e08b6d8923cd961 (patch) | |
| tree | 2344a8b05c796a1fea93b9393cf0fff842ae8e7d | |
| parent | 852bc46fcb530010b83d4918c3e275d01ca585ab (diff) | |
| download | emacs-534dbc9764c4254a2e1d36e78e08b6d8923cd961.tar.gz emacs-534dbc9764c4254a2e1d36e78e08b6d8923cd961.zip | |
(make-face-unitalic, make-face-unbold, make-face-bold)
(make-face-bold-italic, make-face-italic): If frame is t,
do the special handling only if face-font is a list.
| -rw-r--r-- | lisp/faces.el | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index 765ed3f609c..dbe90c75060 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -504,7 +504,7 @@ If that can't be done, return nil." | |||
| 504 | "Make the font of the given face be bold, if possible. | 504 | "Make the font of the given face be bold, if possible. |
| 505 | If NOERROR is non-nil, return nil on failure." | 505 | If NOERROR is non-nil, return nil on failure." |
| 506 | (interactive (list (read-face-name "Make which face bold: "))) | 506 | (interactive (list (read-face-name "Make which face bold: "))) |
| 507 | (if (eq frame t) | 507 | (if (and (eq frame t) (listp (face-font face t))) |
| 508 | (set-face-font face (if (memq 'italic (face-font face t)) | 508 | (set-face-font face (if (memq 'italic (face-font face t)) |
| 509 | '(bold italic) '(bold)) | 509 | '(bold italic) '(bold)) |
| 510 | t) | 510 | t) |
| @@ -541,7 +541,7 @@ If NOERROR is non-nil, return nil on failure." | |||
| 541 | "Make the font of the given face be italic, if possible. | 541 | "Make the font of the given face be italic, if possible. |
| 542 | If NOERROR is non-nil, return nil on failure." | 542 | If NOERROR is non-nil, return nil on failure." |
| 543 | (interactive (list (read-face-name "Make which face italic: "))) | 543 | (interactive (list (read-face-name "Make which face italic: "))) |
| 544 | (if (eq frame t) | 544 | (if (and (eq frame t) (listp (face-font face t))) |
| 545 | (set-face-font face (if (memq 'bold (face-font face t)) | 545 | (set-face-font face (if (memq 'bold (face-font face t)) |
| 546 | '(bold italic) '(italic)) | 546 | '(bold italic) '(italic)) |
| 547 | t) | 547 | t) |
| @@ -578,7 +578,7 @@ If NOERROR is non-nil, return nil on failure." | |||
| 578 | "Make the font of the given face be bold and italic, if possible. | 578 | "Make the font of the given face be bold and italic, if possible. |
| 579 | If NOERROR is non-nil, return nil on failure." | 579 | If NOERROR is non-nil, return nil on failure." |
| 580 | (interactive (list (read-face-name "Make which face bold-italic: "))) | 580 | (interactive (list (read-face-name "Make which face bold-italic: "))) |
| 581 | (if (eq frame t) | 581 | (if (and (eq frame t) (listp (face-font face t))) |
| 582 | (set-face-font face '(bold italic) t) | 582 | (set-face-font face '(bold italic) t) |
| 583 | (let ((ofont (face-font face frame)) | 583 | (let ((ofont (face-font face frame)) |
| 584 | font) | 584 | font) |
| @@ -630,7 +630,7 @@ If NOERROR is non-nil, return nil on failure." | |||
| 630 | "Make the font of the given face be non-bold, if possible. | 630 | "Make the font of the given face be non-bold, if possible. |
| 631 | If NOERROR is non-nil, return nil on failure." | 631 | If NOERROR is non-nil, return nil on failure." |
| 632 | (interactive (list (read-face-name "Make which face non-bold: "))) | 632 | (interactive (list (read-face-name "Make which face non-bold: "))) |
| 633 | (if (eq frame t) | 633 | (if (and (eq frame t) (listp (face-font face t))) |
| 634 | (set-face-font face (if (memq 'italic (face-font face t)) | 634 | (set-face-font face (if (memq 'italic (face-font face t)) |
| 635 | '(italic) nil) | 635 | '(italic) nil) |
| 636 | t) | 636 | t) |
| @@ -662,7 +662,7 @@ If NOERROR is non-nil, return nil on failure." | |||
| 662 | "Make the font of the given face be non-italic, if possible. | 662 | "Make the font of the given face be non-italic, if possible. |
| 663 | If NOERROR is non-nil, return nil on failure." | 663 | If NOERROR is non-nil, return nil on failure." |
| 664 | (interactive (list (read-face-name "Make which face non-italic: "))) | 664 | (interactive (list (read-face-name "Make which face non-italic: "))) |
| 665 | (if (eq frame t) | 665 | (if (and (eq frame t) (listp (face-font face t))) |
| 666 | (set-face-font face (if (memq 'bold (face-font face t)) | 666 | (set-face-font face (if (memq 'bold (face-font face t)) |
| 667 | '(bold) nil) | 667 | '(bold) nil) |
| 668 | t) | 668 | t) |
| @@ -892,15 +892,17 @@ selected frame." | |||
| 892 | ;; Also fill them in from X resources. | 892 | ;; Also fill them in from X resources. |
| 893 | (while rest | 893 | (while rest |
| 894 | (setcdr (car rest) (copy-sequence (cdr (car rest)))) | 894 | (setcdr (car rest) (copy-sequence (cdr (car rest)))) |
| 895 | (if (listp (face-font (cdr (car rest)))) | 895 | (condition-case nil |
| 896 | (let ((bold (memq 'bold (face-font (cdr (car rest))))) | 896 | (if (listp (face-font (cdr (car rest)))) |
| 897 | (italic (memq 'italic (face-font (cdr (car rest)))))) | 897 | (let ((bold (memq 'bold (face-font (cdr (car rest))))) |
| 898 | (if (and bold italic) | 898 | (italic (memq 'italic (face-font (cdr (car rest)))))) |
| 899 | (make-face-bold-italic (car (car rest)) frame) | 899 | (if (and bold italic) |
| 900 | (if bold | 900 | (make-face-bold-italic (car (car rest)) frame) |
| 901 | (make-face-bold (car (car rest)) frame) | 901 | (if bold |
| 902 | (if italic | 902 | (make-face-bold (car (car rest)) frame) |
| 903 | (make-face-italic (car (car rest)) frame)))))) | 903 | (if italic |
| 904 | (make-face-italic (car (car rest)) frame)))))) | ||
| 905 | (error nil)) | ||
| 904 | (make-face-x-resource-internal (cdr (car rest)) frame t) | 906 | (make-face-x-resource-internal (cdr (car rest)) frame t) |
| 905 | (setq rest (cdr rest))) | 907 | (setq rest (cdr rest))) |
| 906 | 908 | ||