⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uncompress.el

📁 早期freebsd实现
💻 EL
字号:
(defun uncompress-while-visiting ()  "Temporary \"major mode\" used for .Z files, to uncompress the contents.It then selects a major mode from the uncompressed file name and contents."  (if (and (not (null buffer-file-name))	   (string-match "\\.Z$" buffer-file-name))      (set-visited-file-name       (substring buffer-file-name 0 (match-beginning 0))))  (message "Uncompressing...")  (let ((buffer-read-only nil))    (shell-command-on-region (point-min) (point-max) "uncompress" t))  (message "Uncompressing...done")  (set-buffer-modified-p nil)  (normal-mode))(setq auto-mode-alist      (cons '("\\.Z$" . uncompress-while-visiting) auto-mode-alist))(defun find-compressed-version ()  "Hook to read and uncompress the compressed version of a file."  ;; Just pretend we had visited the compressed file,  ;; and uncompress-while-visiting will do the rest.  (if (file-exists-p (concat buffer-file-name ".Z"))      (progn	(setq buffer-file-name (concat buffer-file-name ".Z"))	(insert-file-contents buffer-file-name t)	(goto-char (point-min))	(setq error nil)	t)))(setq find-file-not-found-hooks      (cons 'find-compressed-version find-file-not-found-hooks))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -