help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How switch from escaped octal character code to escaped HEX?


From: Stefan Monnier
Subject: Re: How switch from escaped octal character code to escaped HEX?
Date: Tue, 11 Jan 2011 12:34:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> New hex values is not colorized. How make this?

(setq standard-display-table (make-display-table))
(let ( (i ?\x80) hex hi low )
  (while (<= i ?\xff)
    (setq hex (format "%x" i))
    (setq hi (elt hex 0))
    (setq low (elt hex 1))
    (aset standard-display-table (unibyte-char-to-multibyte i)
          (vector (make-glyph-code ?\\ 'escape-glyph)
                  (make-glyph-code ?x 'escape-glyph)
                  (make-glyph-code hi 'escape-glyph)
                  (make-glyph-code low 'escape-glyph)))
    (setq i (+ i 1))))


-- Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]