- (insert-file-contents (expand-file-name filename data-directory))
(hack-local-variables)
(goto-char (point-min))
(search-forward "\n<<")
--- 52,73 ----
(if (get-language-info current-language-environment 'tutorial)
current-language-environment
"English")))
! file filename)
(setq filename (get-language-info lang 'tutorial))
(setq file (expand-file-name (concat "~/" filename)))
(delete-other-windows)
(if (get-file-buffer file)
(switch-to-buffer (get-file-buffer file))
! (setq file (expand-file-name filename data-directory))
! (unless (file-exists-p file)
! (if (file-exists-p (concat file ".gz"))
! (setq file (concat file ".gz"))
! (error "%s does not exist" file)))
! (let ((auto-compression-mode t))
! (find-file file))
=========
Note that insert-file-contents on a special buffer was used to protect
novices for accidently overwriting the original TUTORIAL file while
trying different editing commands. So replacing it with find-file is
not a good idea. But you can still leave insert-file-contents with
let-binding ((auto-compression-mode t)) around it, because compression
mode can handle compressed files on low-level file functions (including
insert-file-contents).
--
Juri Linkov
http://www.jurta.org/emacs/
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel