[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TUTORIAL.gz
From: |
Juri Linkov |
Subject: |
Re: TUTORIAL.gz |
Date: |
Mon, 17 Oct 2005 11:34:03 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
- (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/
- TUTORIAL.gz, David Reitter, 2005/10/12
- Re: TUTORIAL.gz, David Reitter, 2005/10/16
- Re: TUTORIAL.gz,
Juri Linkov <=
- Re: TUTORIAL.gz, Stefan Monnier, 2005/10/17
- Re: TUTORIAL.gz, David Reitter, 2005/10/17
- Re: TUTORIAL.gz, David Kastrup, 2005/10/17
- Re: TUTORIAL.gz, Stefan Monnier, 2005/10/17
- Re: TUTORIAL.gz, Lennart Borgman, 2005/10/17
- Re: TUTORIAL.gz, Stefan Monnier, 2005/10/17
- Re: TUTORIAL.gz, Lennart Borgman, 2005/10/17
- Re: TUTORIAL.gz, Juri Linkov, 2005/10/18
- Re: TUTORIAL.gz, Eli Zaretskii, 2005/10/17
- Re: TUTORIAL.gz, Romain Francoise, 2005/10/17