diff options
| author | Kenichi Handa | 2004-12-09 12:37:05 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-12-09 12:37:05 +0000 |
| commit | 75403d053f70b8753dc54d0b9c0d083c3cd3fd11 (patch) | |
| tree | f4f69ab43a229622656d1fe4ef088a054872d94c | |
| parent | 94531998bbbc5949771f813d3bdc8d6534250e45 (diff) | |
| download | emacs-75403d053f70b8753dc54d0b9c0d083c3cd3fd11.tar.gz emacs-75403d053f70b8753dc54d0b9c0d083c3cd3fd11.zip | |
(char-displayable-p): Check :charset-list property of CODING.
| -rw-r--r-- | lisp/international/mule-util.el | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index a0874999045..abf9027ef7c 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el | |||
| @@ -371,14 +371,35 @@ basis, this may not be accurate." | |||
| 371 | ;; currently selected frame. | 371 | ;; currently selected frame. |
| 372 | (car (internal-char-font nil char))) | 372 | (car (internal-char-font nil char))) |
| 373 | (t | 373 | (t |
| 374 | (let ((coding (terminal-coding-system))) | 374 | (let ((coding 'iso-2022-7bit)) |
| 375 | (if coding | 375 | (if coding |
| 376 | (let ((safe-chars (coding-system-get coding 'safe-chars)) | 376 | (let ((cs-list (coding-system-get coding :charset-list))) |
| 377 | (safe-charsets (coding-system-get coding 'safe-charsets))) | 377 | (cond |
| 378 | (or (and safe-chars | 378 | ((listp cs-list) |
| 379 | (aref safe-chars char)) | 379 | (catch 'tag |
| 380 | (and safe-charsets | 380 | (mapc #'(lambda (charset) |
| 381 | (memq (char-charset char) safe-charsets))))))))) | 381 | (if (encode-char char charset) |
| 382 | (throw 'tag charset))) | ||
| 383 | cs-list) | ||
| 384 | nil)) | ||
| 385 | ((eq cs-list 'iso-2022) | ||
| 386 | (catch 'tag2 | ||
| 387 | (mapc #'(lambda (charset) | ||
| 388 | (if (and (plist-get (charset-plist charset) | ||
| 389 | :iso-final-char) | ||
| 390 | (encode-char char charset)) | ||
| 391 | (throw 'tag2 charset))) | ||
| 392 | charset-list) | ||
| 393 | nil)) | ||
| 394 | ((eq cs-list 'emacs-mule) | ||
| 395 | (catch 'tag3 | ||
| 396 | (mapc #'(lambda (charset) | ||
| 397 | (if (and (plist-get (charset-plist charset) | ||
| 398 | :emacs-mule-id) | ||
| 399 | (encode-char char charset)) | ||
| 400 | (throw 'tag3 charset))) | ||
| 401 | charset-list) | ||
| 402 | nil))))))))) | ||
| 382 | 403 | ||
| 383 | (provide 'mule-util) | 404 | (provide 'mule-util) |
| 384 | 405 | ||