Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e463f071
Commit
e463f071
authored
Jan 09, 2008
by
Kenichi Handa
Browse files
(describe-char-display): Convert a GLYPH-CODE to a
hexadigit string. (describe-char): Adjusted for the above change.
parent
430d2ee2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
lisp/descr-text.el
lisp/descr-text.el
+13
-6
No files found.
lisp/descr-text.el
View file @
e463f071
...
...
@@ -330,11 +330,18 @@ This function is semi-obsolete. Use `get-char-code-property'."
;; Return information about how CHAR is displayed at the buffer
;; position POS. If the selected frame is on a graphic display,
;; return a cons (FONTNAME . GLYPH-CODE). Otherwise, return a string
;; describing the terminal codes for the character.
;; return a cons (FONTNAME . GLYPH-CODE) where GLYPH-CODE is a
;; hexadigit string representing the glyph-ID. Otherwise, return a
;; string describing the terminal codes for the character.
(
defun
describe-char-display
(
pos
char
)
(
if
(
display-graphic-p
(
selected-frame
))
(
internal-char-font
pos
char
)
(
let
((
char-font-info
(
internal-char-font
pos
char
)))
(
if
(
integerp
(
cdr
char-font-info
))
(
setcdr
char-font-info
(
format
"%02X"
(
cdr
char-font-info
)))
(
setcdr
char-font-info
(
format
"%04X%04X"
(
cadr
char-font-info
)
(
cddr
char-font-info
))))
char-font-info
)
(
let*
((
coding
(
terminal-coding-system
))
(
encoded
(
encode-coding-char
char
coding
)))
(
if
encoded
...
...
@@ -482,7 +489,7 @@ as well as widgets, buttons, overlays, and text properties."
(
if
display
(
concat
"by this font (glyph code)\n"
(
format
" %s (#x%
02X
)"
(
format
" %s (#x%
s
)"
(
car
display
)
(
cdr
display
)))
"no font available"
)
(
if
display
...
...
@@ -554,7 +561,7 @@ as well as widgets, buttons, overlays, and text properties."
(
insert
(
glyph-char
(
car
(
aref
disp-vector
i
)))
?:
(
propertize
" "
'display
'
(
space
:align-to
5
))
(
if
(
cdr
(
aref
disp-vector
i
))
(
format
"%s (#x%
02X
)"
(
cadr
(
aref
disp-vector
i
))
(
format
"%s (#x%
s
)"
(
cadr
(
aref
disp-vector
i
))
(
cddr
(
aref
disp-vector
i
)))
"-- no font --"
)
"\n"
)
...
...
@@ -610,7 +617,7 @@ as well as widgets, buttons, overlays, and text properties."
(
insert
"\n "
(
car
elt
)
?:
(
propertize
" "
'display
'
(
space
:align-to
5
))
(
if
(
cdr
elt
)
(
format
"%s (#x%
02X
)"
(
cadr
elt
)
(
cddr
elt
))
(
format
"%s (#x%
s
)"
(
cadr
elt
)
(
cddr
elt
))
"-- no font --"
)))))
(
insert
"these terminal codes:"
)
(
dolist
(
elt
component-chars
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment