261 |
(coding-system-for-read 'iso-2022-7bit)) |
(coding-system-for-read 'iso-2022-7bit)) |
262 |
(find-file-read-only (expand-file-name "HELLO" data-directory)))) |
(find-file-read-only (expand-file-name "HELLO" data-directory)))) |
263 |
|
|
264 |
(defun universal-coding-system-argument () |
(defun universal-coding-system-argument (coding-system) |
265 |
"Execute an I/O command using the specified coding system." |
"Execute an I/O command using the specified coding system." |
266 |
(interactive) |
(interactive |
267 |
(let* ((default (and buffer-file-coding-system |
(let ((default (and buffer-file-coding-system |
268 |
(not (eq (coding-system-type buffer-file-coding-system) |
(not (eq (coding-system-type buffer-file-coding-system) |
269 |
t)) |
t)) |
270 |
buffer-file-coding-system)) |
buffer-file-coding-system))) |
271 |
(coding-system (read-coding-system |
(list (read-coding-system |
272 |
(if default |
(if default |
273 |
(format "Coding system for following command (default, %s): " default) |
(format "Coding system for following command (default, %s): " default) |
274 |
"Coding system for following command: ") |
"Coding system for following command: ") |
275 |
default)) |
default)))) |
276 |
(keyseq (read-key-sequence |
(let* ((keyseq (read-key-sequence |
277 |
(format "Command to execute with %s:" coding-system))) |
(format "Command to execute with %s:" coding-system))) |
278 |
(cmd (key-binding keyseq)) |
(cmd (key-binding keyseq)) |
279 |
prefix) |
prefix) |