diff options
| author | Richard M. Stallman | 1994-07-01 17:31:42 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-07-01 17:31:42 +0000 |
| commit | 4b3203d9709fe9d7474e8ea64cfc07b59550c79e (patch) | |
| tree | 3815419097ab1152391375a2335864ebd256b853 | |
| parent | 96c3ed60ae56f4d8d1143fb17f3dff395df1299c (diff) | |
| download | emacs-4b3203d9709fe9d7474e8ea64cfc07b59550c79e.tar.gz emacs-4b3203d9709fe9d7474e8ea64cfc07b59550c79e.zip | |
(make-face-italic, make-face-bold): Don't bind f2 here.
(make-face-bold-internal, make-face-italic-internal): Bind f2 here.
(make-face-bold-italic-internal, make-face-italic-internal)
(make-face-bold-internal): New arg `font'. Callers changed.
| -rw-r--r-- | lisp/faces.el | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index a387a2222e4..380bb0c066b 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -518,7 +518,7 @@ If NOERROR is non-nil, return nil on failure." | |||
| 518 | '(bold italic) '(bold)) | 518 | '(bold italic) '(bold)) |
| 519 | t) | 519 | t) |
| 520 | (let ((ofont (face-font face frame)) | 520 | (let ((ofont (face-font face frame)) |
| 521 | font f2) | 521 | font) |
| 522 | (if (null frame) | 522 | (if (null frame) |
| 523 | (let ((frames (frame-list))) | 523 | (let ((frames (frame-list))) |
| 524 | ;; Make this face bold in global-face-data. | 524 | ;; Make this face bold in global-face-data. |
| @@ -535,16 +535,17 @@ If NOERROR is non-nil, return nil on failure." | |||
| 535 | (setq font (or font | 535 | (setq font (or font |
| 536 | (face-font 'default frame) | 536 | (face-font 'default frame) |
| 537 | (cdr (assq 'font (frame-parameters frame))))) | 537 | (cdr (assq 'font (frame-parameters frame))))) |
| 538 | (make-face-bold-internal face frame)) | 538 | (make-face-bold-internal face frame font)) |
| 539 | (or (not (equal ofont (face-font face))) | 539 | (or (not (equal ofont (face-font face))) |
| 540 | (and (not noerror) | 540 | (and (not noerror) |
| 541 | (error "No bold version of %S" font)))))) | 541 | (error "No bold version of %S" font)))))) |
| 542 | 542 | ||
| 543 | (defun make-face-bold-internal (face frame) | 543 | (defun make-face-bold-internal (face frame font) |
| 544 | (or (and (setq f2 (x-make-font-bold font)) | 544 | (let (f2) |
| 545 | (internal-try-face-font face f2 frame)) | 545 | (or (and (setq f2 (x-make-font-bold font)) |
| 546 | (and (setq f2 (x-make-font-demibold font)) | 546 | (internal-try-face-font face f2 frame)) |
| 547 | (internal-try-face-font face f2 frame)))) | 547 | (and (setq f2 (x-make-font-demibold font)) |
| 548 | (internal-try-face-font face f2 frame))))) | ||
| 548 | 549 | ||
| 549 | (defun make-face-italic (face &optional frame noerror) | 550 | (defun make-face-italic (face &optional frame noerror) |
| 550 | "Make the font of the given face be italic, if possible. | 551 | "Make the font of the given face be italic, if possible. |
| @@ -555,7 +556,7 @@ If NOERROR is non-nil, return nil on failure." | |||
| 555 | '(bold italic) '(italic)) | 556 | '(bold italic) '(italic)) |
| 556 | t) | 557 | t) |
| 557 | (let ((ofont (face-font face frame)) | 558 | (let ((ofont (face-font face frame)) |
| 558 | font f2) | 559 | font) |
| 559 | (if (null frame) | 560 | (if (null frame) |
| 560 | (let ((frames (frame-list))) | 561 | (let ((frames (frame-list))) |
| 561 | ;; Make this face italic in global-face-data. | 562 | ;; Make this face italic in global-face-data. |
| @@ -572,16 +573,17 @@ If NOERROR is non-nil, return nil on failure." | |||
| 572 | (setq font (or font | 573 | (setq font (or font |
| 573 | (face-font 'default frame) | 574 | (face-font 'default frame) |
| 574 | (cdr (assq 'font (frame-parameters frame))))) | 575 | (cdr (assq 'font (frame-parameters frame))))) |
| 575 | (make-face-italic-internal face frame)) | 576 | (make-face-italic-internal face frame font)) |
| 576 | (or (not (equal ofont (face-font face))) | 577 | (or (not (equal ofont (face-font face))) |
| 577 | (and (not noerror) | 578 | (and (not noerror) |
| 578 | (error "No italic version of %S" font)))))) | 579 | (error "No italic version of %S" font)))))) |
| 579 | 580 | ||
| 580 | (defun make-face-italic-internal (face frame) | 581 | (defun make-face-italic-internal (face frame font) |
| 581 | (or (and (setq f2 (x-make-font-italic font)) | 582 | (let (f2) |
| 582 | (internal-try-face-font face f2 frame)) | 583 | (or (and (setq f2 (x-make-font-italic font)) |
| 583 | (and (setq f2 (x-make-font-oblique font)) | 584 | (internal-try-face-font face f2 frame)) |
| 584 | (internal-try-face-font face f2 frame)))) | 585 | (and (setq f2 (x-make-font-oblique font)) |
| 586 | (internal-try-face-font face f2 frame))))) | ||
| 585 | 587 | ||
| 586 | (defun make-face-bold-italic (face &optional frame noerror) | 588 | (defun make-face-bold-italic (face &optional frame noerror) |
| 587 | "Make the font of the given face be bold and italic, if possible. | 589 | "Make the font of the given face be bold and italic, if possible. |
| @@ -607,12 +609,12 @@ If NOERROR is non-nil, return nil on failure." | |||
| 607 | (setq font (or font | 609 | (setq font (or font |
| 608 | (face-font 'default frame) | 610 | (face-font 'default frame) |
| 609 | (cdr (assq 'font (frame-parameters frame))))) | 611 | (cdr (assq 'font (frame-parameters frame))))) |
| 610 | (make-face-bold-italic-internal face frame)) | 612 | (make-face-bold-italic-internal face frame font)) |
| 611 | (or (not (equal ofont (face-font face))) | 613 | (or (not (equal ofont (face-font face))) |
| 612 | (and (not noerror) | 614 | (and (not noerror) |
| 613 | (error "No bold italic version of %S" font)))))) | 615 | (error "No bold italic version of %S" font)))))) |
| 614 | 616 | ||
| 615 | (defun make-face-bold-italic-internal (face frame) | 617 | (defun make-face-bold-italic-internal (face frame font) |
| 616 | (let (f2 f3) | 618 | (let (f2 f3) |
| 617 | (or (and (setq f2 (x-make-font-italic font)) | 619 | (or (and (setq f2 (x-make-font-italic font)) |
| 618 | (not (equal font f2)) | 620 | (not (equal font f2)) |