题
我想编写一个函数,类似 hexl-find-file
, ,这将打开一个gzzpiped文件,并在hexl模式中显示内容。我该怎么做?
解决方案
这个适合您吗?
(require 'jka-compr)
(defun hexl-find-file ()
"call find file and then jump into hexl mode"
(interactive)
(call-interactively 'find-file)
(hexl-mode 1))
这 'jka-compr
提供无缝的压缩文件处理,并 'hexl-find-file
只是打开文件并打开 hexl-mode
.
其他提示
在运行hexl-find文件之前,打开自动压缩模式?
,----[ C-h f auto-compression-mode RET ]
| `auto-compression-mode' is an interactive compiled Lisp function
| -- loaded from "/usr/share/xemacs21/xemacs-packages/lisp/os-utils/auto-autoloads"
| (auto-compression-mode &optional ARG)
|
| Documentation:
| Toggle automatic file compression and uncompression.
| With prefix argument ARG, turn auto compression on if positive, else off.
| Returns the new status of auto compression (non-nil means on).
|
| Invoked with:
|
| M-x auto-compression-mode
`----
不隶属于 StackOverflow