252 |
"Execute an I/O command using the specified coding system." |
"Execute an I/O command using the specified coding system." |
253 |
(interactive) |
(interactive) |
254 |
(let* ((default (and buffer-file-coding-system |
(let* ((default (and buffer-file-coding-system |
255 |
|
;; Fixme: what is t here? |
256 |
(not (eq (coding-system-type buffer-file-coding-system) |
(not (eq (coding-system-type buffer-file-coding-system) |
257 |
t)) |
t)) |
258 |
buffer-file-coding-system)) |
buffer-file-coding-system)) |
394 |
(if (memq base lang-preferred) 8 0) |
(if (memq base lang-preferred) 8 0) |
395 |
(if (string-match "-with-esc$" (symbol-name base)) |
(if (string-match "-with-esc$" (symbol-name base)) |
396 |
0 4) |
0 4) |
397 |
(if (eq (coding-system-type base) 2) |
;; Fixme: sort out coding-system-spec |
398 |
;; For ISO based coding systems, prefer |
;; (if (eq (coding-system-type base) 'iso-2022) |
399 |
;; one that doesn't use escape sequences. |
;; ;; For ISO based coding systems, prefer |
400 |
;; Fixme: coding-system-spec |
;; ;; one that doesn't use escape sequences. |
401 |
(let* ((extra-spec (coding-system-spec base)) |
;; (let* ((extra-spec (coding-system-spec base)) |
402 |
(flags (aref extra-spec 3))) |
;; (flags (aref extra-spec 3))) |
403 |
(if (/= (logand flags #x40) 0) |
;; (if (/= (logand flags #x40) 0) |
404 |
(if (/= (logand flags #x30) 0) |
;; (if (/= (logand flags #x30) 0) |
405 |
0 |
;; 0 |
406 |
1) |
;; 1) |
407 |
2)) |
;; 2)) |
408 |
1))))))) |
;; 1) |
409 |
|
)))))) |
410 |
(sort codings (function (lambda (x y) |
(sort codings (function (lambda (x y) |
411 |
(> (funcall func x) (funcall func y)))))))) |
(> (funcall func x) (funcall func y)))))))) |
412 |
|
|
2013 |
"Return a pretty description of STR that is encoded by CODING-SYSTEM." |
"Return a pretty description of STR that is encoded by CODING-SYSTEM." |
2014 |
(setq str (string-as-unibyte str)) |
(setq str (string-as-unibyte str)) |
2015 |
(mapconcat |
(mapconcat |
2016 |
(if (and coding-system (eq (coding-system-type coding-system) 2)) |
(if (and coding-system (eq (coding-system-type coding-system) 'iso-2022)) |
2017 |
;; Try to get a pretty description for ISO 2022 escape sequences. |
;; Try to get a pretty description for ISO 2022 escape sequences. |
2018 |
(function (lambda (x) (or (cdr (assq x iso-2022-control-alist)) |
(function (lambda (x) (or (cdr (assq x iso-2022-control-alist)) |
2019 |
(format "%02X" x)))) |
(format "%02X" x)))) |