diff options
| author | Dave Love | 2003-09-01 18:46:41 +0000 |
|---|---|---|
| committer | Dave Love | 2003-09-01 18:46:41 +0000 |
| commit | 1b07ce5a128dceaa22c4cafa8d2e1ffa6f594107 (patch) | |
| tree | 8703c001f5ded20d87319227e10affc26dd64987 | |
| parent | 8ce0e9a83abef6755a3486632315e668b26c8383 (diff) | |
| download | emacs-1b07ce5a128dceaa22c4cafa8d2e1ffa6f594107.tar.gz emacs-1b07ce5a128dceaa22c4cafa8d2e1ffa6f594107.zip | |
(latin1-char-displayable-p): Now
obsolete alias. Replace uses with char-displayable-p.
(latin1-display-ucs-per-lynx): Fix last change.
| -rw-r--r-- | lisp/international/latin1-disp.el | 52 |
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." | |||
| 106 | (if sets | 106 | (if sets |
| 107 | (progn | 107 | (progn |
| 108 | (mapc #'latin1-display-setup sets) | 108 | (mapc #'latin1-display-setup sets) |
| 109 | (unless (latin1-char-displayable-p | 109 | (unless (char-displayable-p |
| 110 | (make-char 'mule-unicode-0100-24ff 32 33)) | 110 | (make-char 'mule-unicode-0100-24ff 32 33)) |
| 111 | ;; It doesn't look as though we have a Unicode font. | 111 | ;; It doesn't look as though we have a Unicode font. |
| 112 | (map-char-table | 112 | (map-char-table |
| @@ -221,47 +221,11 @@ character set: `latin-2', `hebrew' etc." | |||
| 221 | (setq language 'cyrillic-iso)) | 221 | (setq language 'cyrillic-iso)) |
| 222 | (let* ((info (get-language-info language 'charset)) | 222 | (let* ((info (get-language-info language 'charset)) |
| 223 | (char (and info (make-char (car (remq 'ascii info)) ?\ )))) | 223 | (char (and info (make-char (car (remq 'ascii info)) ?\ )))) |
| 224 | (and char (latin1-char-displayable-p char)))) | 224 | (and char (char-displayable-p char)))) |
| 225 | 225 | ||
| 226 | ;; This should be moved into mule-utils or somewhere after 21.1. | 226 | ;; Backwards compatibility. |
| 227 | (defun latin1-char-displayable-p (char) | 227 | (defalias 'latin1-char-displayable-p 'char-displayable-p) |
| 228 | "Return non-nil if we should be able to display CHAR. | 228 | (make-obsolete 'latin1-char-displayable-p 'char-displayable-p "21.5") |
| 229 | On a multi-font display, the test is only whether there is an | ||
| 230 | appropriate font from the selected frame's fontset to display CHAR's | ||
| 231 | charset in general. Since fonts may be specified on a per-character | ||
| 232 | basis, this may not be accurate." | ||
| 233 | (cond ((< char 256) | ||
| 234 | ;; Single byte characters are always displayable. | ||
| 235 | t) | ||
| 236 | ((display-multi-font-p) | ||
| 237 | ;; On a window system, a character is displayable if we have | ||
| 238 | ;; a font for that character in the default face of the | ||
| 239 | ;; currently selected frame. | ||
| 240 | (let ((fontset (frame-parameter (selected-frame) 'font)) | ||
| 241 | font-pattern) | ||
| 242 | (if (query-fontset fontset) | ||
| 243 | (setq font-pattern (fontset-font fontset char))) | ||
| 244 | (or font-pattern | ||
| 245 | (setq font-pattern (fontset-font "fontset-default" char))) | ||
| 246 | (if font-pattern | ||
| 247 | (progn | ||
| 248 | ;; Now FONT-PATTERN is a string or a cons of family | ||
| 249 | ;; field pattern and registry field pattern. | ||
| 250 | (or (stringp font-pattern) | ||
| 251 | (setq font-pattern (concat "-" | ||
| 252 | (or (car font-pattern) "*") | ||
| 253 | "-*-" | ||
| 254 | (cdr font-pattern)))) | ||
| 255 | (x-list-fonts font-pattern 'default (selected-frame) 1))))) | ||
| 256 | (t | ||
| 257 | (let ((coding (terminal-coding-system))) | ||
| 258 | (if coding | ||
| 259 | (let ((safe-chars (coding-system-get coding 'safe-chars)) | ||
| 260 | (safe-charsets (coding-system-get coding 'safe-charsets))) | ||
| 261 | (or (and safe-chars | ||
| 262 | (aref safe-chars char)) | ||
| 263 | (and safe-charsets | ||
| 264 | (memq (char-charset char) safe-charsets))))))))) | ||
| 265 | 229 | ||
| 266 | (defun latin1-display-setup (set &optional force) | 230 | (defun latin1-display-setup (set &optional force) |
| 267 | "Set up Latin-1 display for characters in the given SET. | 231 | "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 | |||
| 826 | is't changed if the display can render Unicode characters." | 790 | is't changed if the display can render Unicode characters." |
| 827 | (interactive "p") | 791 | (interactive "p") |
| 828 | (if (> arg 0) | 792 | (if (> arg 0) |
| 829 | (unless (latin1-char-displayable-p | 793 | (unless (char-displayable-p |
| 830 | (make-char 'mule-unicode-0100-24ff 32 33)) | 794 | (make-char 'mule-unicode-0100-24ff 32 33)) |
| 831 | ;; It doesn't look as though we have a Unicode font. | 795 | ;; It doesn't look as though we have a Unicode font. |
| 832 | (let ((latin1-display-format "%s")) | 796 | (let ((latin1-display-format "%s")) |
| @@ -3245,8 +3209,8 @@ is't changed if the display can render Unicode characters." | |||
| 3245 | (?\$,3sc(B "\"") | 3209 | (?\$,3sc(B "\"") |
| 3246 | (?\$,3sd(B ",") | 3210 | (?\$,3sd(B ",") |
| 3247 | ;; Not from Lynx | 3211 | ;; Not from Lynx |
| 3248 | (?$,3r_(B . "") | 3212 | (?$,3r_(B "") |
| 3249 | (?$,3u=(B . "?"))))) | 3213 | (?$,3u=(B "?"))))) |
| 3250 | (aset standard-display-table | 3214 | (aset standard-display-table |
| 3251 | (make-char 'mule-unicode-0100-24ff) nil) | 3215 | (make-char 'mule-unicode-0100-24ff) nil) |
| 3252 | (aset standard-display-table | 3216 | (aset standard-display-table |