diff options
| author | Richard M. Stallman | 1997-03-18 07:20:16 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-03-18 07:20:16 +0000 |
| commit | 5afb8c58f52a64adc148eea9dc05d6e194c1938c (patch) | |
| tree | ee3e1ab6f0423b659e8fe67409e505e14615b695 | |
| parent | 85e77a3fcf0273533d1c2c4a80e595e621bdfeef (diff) | |
| download | emacs-5afb8c58f52a64adc148eea9dc05d6e194c1938c.tar.gz emacs-5afb8c58f52a64adc148eea9dc05d6e194c1938c.zip | |
Conditionalize the fontset code on
whether new-fontset is bound.
| -rw-r--r-- | lisp/term/x-win.el | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 4855206c865..6fc30fde8a3 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -75,7 +75,8 @@ | |||
| 75 | (require 'faces) | 75 | (require 'faces) |
| 76 | (require 'select) | 76 | (require 'select) |
| 77 | (require 'menu-bar) | 77 | (require 'menu-bar) |
| 78 | (require 'fontset) | 78 | (if (fboundp 'new-fontset) |
| 79 | (require 'fontset)) | ||
| 79 | 80 | ||
| 80 | (defvar x-invocation-args) | 81 | (defvar x-invocation-args) |
| 81 | 82 | ||
| @@ -641,39 +642,41 @@ This is in addition to the primary selection.") | |||
| 641 | (setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100) | 642 | (setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100) |
| 642 | x-cut-buffer-max)) | 643 | x-cut-buffer-max)) |
| 643 | 644 | ||
| 644 | ;; Create a default fontset. | 645 | (if (fboundp 'new-fontset) |
| 645 | (create-fontset-from-fontset-spec default-fontset-spec) | 646 | (progn |
| 646 | 647 | ;; Create a default fontset. | |
| 647 | ;; Create fontset specified in X resources. | 648 | (create-fontset-from-fontset-spec default-fontset-spec) |
| 648 | (create-fontset-from-x-resource) | 649 | |
| 649 | 650 | ;; Create fontset specified in X resources. | |
| 650 | ;; Try to create a fontset from font specification which comes from | 651 | (create-fontset-from-x-resource) |
| 651 | ;; initial-frame-alist, default-frame-alist, or X resource if the font | 652 | |
| 652 | ;; name conforms to XLFD and the registry part is `fontset'. A font | 653 | ;; Try to create a fontset from font specification which comes from |
| 653 | ;; specification in command line argument (-fn XXXX) should be in | 654 | ;; initial-frame-alist, default-frame-alist, or X resource if the font |
| 654 | ;; default-frame-alist already. However, any font specification in | 655 | ;; name conforms to XLFD and the registry part is `fontset'. A font |
| 655 | ;; site-start library, user's init file (.emacs), and default.el are | 656 | ;; specification in command line argument (-fn XXXX) should be in |
| 656 | ;; not yet handled here. | 657 | ;; default-frame-alist already. However, any font specification in |
| 657 | 658 | ;; site-start library, user's init file (.emacs), and default.el are | |
| 658 | (let ((font (or (cdr (assq 'font initial-frame-alist)) | 659 | ;; not yet handled here. |
| 659 | (cdr (assq 'font default-frame-alist)) | 660 | |
| 660 | (x-get-resource "font" "Font") | 661 | (let ((font (or (cdr (assq 'font initial-frame-alist)) |
| 661 | (x-get-resource "fontset" "Fontset"))) | 662 | (cdr (assq 'font default-frame-alist)) |
| 662 | xlfd-fields fontlist) | 663 | (x-get-resource "font" "Font") |
| 663 | (if (and font | 664 | (x-get-resource "fontset" "Fontset"))) |
| 664 | (not (query-fontset font)) | 665 | xlfd-fields fontlist) |
| 665 | (setq xlfd-fields (x-decompose-font-name font))) | 666 | (if (and font |
| 666 | (progn | 667 | (not (query-fontset font)) |
| 667 | (if (not (string= "fontset" | 668 | (setq xlfd-fields (x-decompose-font-name font))) |
| 668 | (aref xlfd-fields xlfd-regexp-registry-subnum))) | ||
| 669 | (progn | 669 | (progn |
| 670 | ;; Create a fontset of the name FONT. | 670 | (if (not (string= "fontset" |
| 671 | (setq fontlist (list (cons 'ascii font))) | 671 | (aref xlfd-fields xlfd-regexp-registry-subnum))) |
| 672 | (aset xlfd-fields xlfd-regexp-foundry-subnum nil) | 672 | (progn |
| 673 | (aset xlfd-fields xlfd-regexp-family-subnum nil) | 673 | ;; Create a fontset of the name FONT. |
| 674 | (aset xlfd-fields xlfd-regexp-adstyle-subnum nil) | 674 | (setq fontlist (list (cons 'ascii font))) |
| 675 | (aset xlfd-fields xlfd-regexp-avgwidth-subnum nil))) | 675 | (aset xlfd-fields xlfd-regexp-foundry-subnum nil) |
| 676 | (new-fontset font (x-complement-fontset-spec xlfd-fields fontlist))))) | 676 | (aset xlfd-fields xlfd-regexp-family-subnum nil) |
| 677 | (aset xlfd-fields xlfd-regexp-adstyle-subnum nil) | ||
| 678 | (aset xlfd-fields xlfd-regexp-avgwidth-subnum nil))) | ||
| 679 | (new-fontset font (x-complement-fontset-spec xlfd-fields fontlist))))))) | ||
| 677 | 680 | ||
| 678 | ;; Sun expects the menu bar cut and paste commands to use the clipboard. | 681 | ;; Sun expects the menu bar cut and paste commands to use the clipboard. |
| 679 | ;; This has ,? to match both on Sunos and on Solaris. | 682 | ;; This has ,? to match both on Sunos and on Solaris. |