summaryrefslogtreecommitdiff
path: root/lisp/international
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>2003-09-01 18:46:41 +0000
committerDave Love <fx@gnu.org>2003-09-01 18:46:41 +0000
commit1b07ce5a128dceaa22c4cafa8d2e1ffa6f594107 (patch)
tree8703c001f5ded20d87319227e10affc26dd64987 /lisp/international
parent8ce0e9a83abef6755a3486632315e668b26c8383 (diff)
downloademacs-1b07ce5a128dceaa22c4cafa8d2e1ffa6f594107.tar.gz
(latin1-char-displayable-p): Now
obsolete alias. Replace uses with char-displayable-p. (latin1-display-ucs-per-lynx): Fix last change.
Diffstat (limited to 'lisp/international')
-rw-r--r--lisp/international/latin1-disp.el52
1 files changed, 8 insertions, 44 deletions
diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el
index d77d2f1bb3b..fae82cdb8bc 100644
--- a/lisp/international/latin1-disp.el
+++ b/lisp/international/latin1-disp.el
@@ -106,7 +106,7 @@ a Unicode font with which to display them."
(if sets
(progn
(mapc #'latin1-display-setup sets)
- (unless (latin1-char-displayable-p
+ (unless (char-displayable-p
(make-char 'mule-unicode-0100-24ff 32 33))
;; It doesn't look as though we have a Unicode font.
(map-char-table
@@ -221,47 +221,11 @@ character set: `latin-2', `hebrew' etc."
(setq language 'cyrillic-iso))
(let* ((info (get-language-info language 'charset))
(char (and info (make-char (car (remq 'ascii info)) ?\ ))))
- (and char (latin1-char-displayable-p char))))
+ (and char (char-displayable-p char))))
-;; This should be moved into mule-utils or somewhere after 21.1.
-(defun latin1-char-displayable-p (char)
- "Return non-nil if we should be able to display CHAR.
-On a multi-font display, the test is only whether there is an
-appropriate font from the selected frame's fontset to display CHAR's
-charset in general. Since fonts may be specified on a per-character
-basis, this may not be accurate."
- (cond ((< char 256)
- ;; Single byte characters are always displayable.
- t)
- ((display-multi-font-p)
- ;; On a window system, a character is displayable if we have
- ;; a font for that character in the default face of the
- ;; currently selected frame.
- (let ((fontset (frame-parameter (selected-frame) 'font))
- font-pattern)
- (if (query-fontset fontset)
- (setq font-pattern (fontset-font fontset char)))
- (or font-pattern
- (setq font-pattern (fontset-font "fontset-default" char)))
- (if font-pattern
- (progn
- ;; Now FONT-PATTERN is a string or a cons of family
- ;; field pattern and registry field pattern.
- (or (stringp font-pattern)
- (setq font-pattern (concat "-"
- (or (car font-pattern) "*")
- "-*-"
- (cdr font-pattern))))
- (x-list-fonts font-pattern 'default (selected-frame) 1)))))
- (t
- (let ((coding (terminal-coding-system)))
- (if coding
- (let ((safe-chars (coding-system-get coding 'safe-chars))
- (safe-charsets (coding-system-get coding 'safe-charsets)))
- (or (and safe-chars
- (aref safe-chars char))
- (and safe-charsets
- (memq (char-charset char) safe-charsets)))))))))
+;; Backwards compatibility.
+(defalias 'latin1-char-displayable-p 'char-displayable-p)
+(make-obsolete 'latin1-char-displayable-p 'char-displayable-p "21.5")
(defun latin1-display-setup (set &optional force)
"Set up Latin-1 display for characters in the given SET.
@@ -826,7 +790,7 @@ turn it off and display Unicode characters literally. The display
is't changed if the display can render Unicode characters."
(interactive "p")
(if (> arg 0)
- (unless (latin1-char-displayable-p
+ (unless (char-displayable-p
(make-char 'mule-unicode-0100-24ff 32 33))
;; It doesn't look as though we have a Unicode font.
(let ((latin1-display-format "%s"))
@@ -3245,8 +3209,8 @@ is't changed if the display can render Unicode characters."
(?\$,3sc(B "\"")
(?\$,3sd(B ",")
;; Not from Lynx
- (?$,3r_(B . "")
- (?$,3u=(B . "?")))))
+ (?$,3r_(B "")
+ (?$,3u=(B "?")))))
(aset standard-display-table
(make-char 'mule-unicode-0100-24ff) nil)
(aset standard-display-table