> ! (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). Agreed. Except that let-binding auto-compression-mode doesn't do much if anything. Better just check whether auto-compression-mode is nil and if so don't try to load the .gz file. Actually, jka-compr.el should provide a list of extensions it understands, so we wouldn't have to hard-code .gz here. I guess jka-compr-load-suffixes could be used for that. The code in info.el that handles compressed files could/should also be merged in. Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel