Mercurial > emacs
changeset 90058:48f163b71dbf
(char-displayable-p): Check :charset-list property of CODING.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 09 Dec 2004 12:37:05 +0000 |
parents | 241d36dfc5ec |
children | 9b0bfaaaec9c |
files | lisp/international/mule-util.el |
diffstat | 1 files changed, 28 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule-util.el Wed Dec 08 23:43:12 2004 +0000 +++ b/lisp/international/mule-util.el Thu Dec 09 12:37:05 2004 +0000 @@ -371,14 +371,35 @@ ;; currently selected frame. (car (internal-char-font nil char))) (t - (let ((coding (terminal-coding-system))) + (let ((coding 'iso-2022-7bit)) (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))))))))) + (let ((cs-list (coding-system-get coding :charset-list))) + (cond + ((listp cs-list) + (catch 'tag + (mapc #'(lambda (charset) + (if (encode-char char charset) + (throw 'tag charset))) + cs-list) + nil)) + ((eq cs-list 'iso-2022) + (catch 'tag2 + (mapc #'(lambda (charset) + (if (and (plist-get (charset-plist charset) + :iso-final-char) + (encode-char char charset)) + (throw 'tag2 charset))) + charset-list) + nil)) + ((eq cs-list 'emacs-mule) + (catch 'tag3 + (mapc #'(lambda (charset) + (if (and (plist-get (charset-plist charset) + :emacs-mule-id) + (encode-char char charset)) + (throw 'tag3 charset))) + charset-list) + nil))))))))) (provide 'mule-util)