emacs-devel
[Top][All Lists]
Advanced

[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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]