Set display-raw-bytes-as-hex for Emacs 26.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 12 Mar 2020 12:37:36 +0200
changeset 1613 61ea45815411
parent 1612 1bf9e4f1d289
child 1614 c858fc552ec5
Set display-raw-bytes-as-hex for Emacs 26.
.emacs-my
--- a/.emacs-my	Thu Mar 12 12:32:22 2020 +0200
+++ b/.emacs-my	Thu Mar 12 12:37:36 2020 +0200
@@ -717,7 +717,10 @@
 (setq read-quoted-char-radix 16)
 
 ;; https://emacs.stackexchange.com/questions/33117/showing-bytes-as-hexadecimal-escapes-rather-than-octal-escapes
-(when (and (>= emacs-major-version 22) (not (eq system-type 'darwin)))
+(cond
+ ((>= emacs-major-version 26)
+  (setq display-raw-bytes-as-hex t))
+ ((and (>= emacs-major-version 22) (not (eq system-type 'darwin)))
   (setq standard-display-table (make-display-table))
   (let ( (i ?\x80) hex hi low )
     (while (<= i ?\xff)
@@ -725,7 +728,7 @@
             (cl-map 'vector
                     (lambda (c) (make-glyph-code c 'escape-glyph))
                     (format "\\%02x" i)))
-      (setq i (1+ i)))))
+      (setq i (1+ i))))))
 
 (defun my--get-char (name)
   "Get character by Unicode `name'."