comparison lisp/descr-text.el @ 91335:07ce8496076f

(describe-char-display): Fix previous change.
author Kenichi Handa <handa@m17n.org>
date Fri, 11 Jan 2008 04:16:14 +0000
parents f64f6ef4cdfe
children ca8b9e092766
comparison
equal deleted inserted replaced
91334:ee57eaa96e8c 91335:07ce8496076f
334 ;; hexadigit string representing the glyph-ID. Otherwise, return a 334 ;; hexadigit string representing the glyph-ID. Otherwise, return a
335 ;; string describing the terminal codes for the character. 335 ;; string describing the terminal codes for the character.
336 (defun describe-char-display (pos char) 336 (defun describe-char-display (pos char)
337 (if (display-graphic-p (selected-frame)) 337 (if (display-graphic-p (selected-frame))
338 (let ((char-font-info (internal-char-font pos char))) 338 (let ((char-font-info (internal-char-font pos char)))
339 (if (integerp (cdr char-font-info)) 339 (if char-font-info
340 (setcdr char-font-info (format "%02X" (cdr char-font-info))) 340 (if (integerp (cdr char-font-info))
341 (setcdr char-font-info 341 (setcdr char-font-info (format "%02X" (cdr char-font-info)))
342 (format "%04X%04X" 342 (setcdr char-font-info
343 (cadr char-font-info) (cddr char-font-info)))) 343 (format "%04X%04X"
344 (cadr char-font-info) (cddr char-font-info)))))
344 char-font-info) 345 char-font-info)
345 (let* ((coding (terminal-coding-system)) 346 (let* ((coding (terminal-coding-system))
346 (encoded (encode-coding-char char coding))) 347 (encoded (encode-coding-char char coding)))
347 (if encoded 348 (if encoded
348 (encoded-string-description encoded coding))))) 349 (encoded-string-description encoded coding)))))