Adrian,
Thanks for this patch. It has been applied to the 21.1 branch of
XEmacs, and will appear in XEmacs 21.1.12.
- vin
>>>> On 28 Jul 2000, Adrian Aichner
<aichner(a)ecf.teradyne.com> said:
APA> Hello Vin, hello All,
APA> this is a 21.1 version of following patch, which did not apply cleanly
APA> to 21.1.11:
> From: Adrian Aichner <aichner(a)ecf.teradyne.com>
> Subject: Re: [jgd(a)lanl.gov] I think the xemacs FTP package directory is fouled up...
> To: Jan Vroonhof <jan.vroonhof(a)insignia.com>
> Cc: Dan Holmsand <dan(a)innehallsbolaget.com>,
> sperber(a)informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]),
> XEmacs Beta List <xemacs-beta(a)xemacs.org>
> Date: 28 Jul 2000 15:50:53 +0200
> References: <uittsn5fr.fsf(a)ecf.teradyne.com>
> <y9l8zuot66y.fsf(a)sams.informatik.uni-tuebingen.de>
> <uwvi8j84i.fsf(a)ecf.teradyne.com>
> <y9lu2dcrn2t.fsf(a)sams.informatik.uni-tuebingen.de>
> <uem4f78wp.fsf(a)ecf.teradyne.com> <66prxi9n.fsf(a)innehallsbolaget.com>
> <uaef3kqdk.fsf(a)ecf.teradyne.com>
<g3em4ek6f0.fsf(a)bart.isltd.insignia.com>
> <og3i4k4p.fsf(a)innehallsbolaget.com>
> <g31z0ejz0b.fsf(a)bart.isltd.insignia.com>
> Message-ID: <uem4ez7lu.fsf(a)ecf.teradyne.com>
APA> It fixes the currently broken `insert-file-contents-literally', which
APA> in turn broke `package-get'.
APA> I have tested this patch by installing the "lookup" package from
APA>
xemacs.org.
APA> Given the importance of an easy way to install XEmacs packages, this
APA> patch alone may justify 21.1.12.
APA> BTW: The Windows NT native build of 21.1.11 works great!
APA> Best regards,
APA> Adrian
APA> cd d:\tmp\21.1\xemacs\
APA> cvs diff
APA> Compilation started at Fri Jul 28 18:15:16 2000 +0200 (W. Europe Daylight Time)
APA> Index: lisp/ChangeLog
APA> ===================================================================
APA> RCS file: /usr/CVSroot/XEmacs/xemacs/lisp/ChangeLog,v
APA> retrieving revision 1.246
APA> diff -u -r1.246 ChangeLog
APA> --- ChangeLog 2000/07/18 02:39:21 1.246
APA> +++ ChangeLog 2000/07/28 16:20:13
APA> @@ -1,3 +1,15 @@
APA> +2000-07-28 Adrian Aichner <aichner(a)ecf.teradyne.com>
APA> +
APA> + * files.el (insert-file-contents-literally): Fix second let
APA> + binding for `coding-system-for-read' to `coding-system-for-write'
APA> + as suggested by Dan Holmsand <dan(a)innehallsbolaget.com>.
APA> +
APA> +1999-06-15 Jan Vroonhof <vroonhof(a)math.ethz.ch>
APA> +
APA> + * files.el (insert-file-contents-literally): Use binary coding
APA> + system (from Morioka san).
APA> + (insert-file-contents-literally): Make file-name-handler method.
APA> +
APA> 2000-07-17 XEmacs Build Bot <builds(a)cvs.xemacs.org>
APA> * XEmacs 21.1.11 is released
APA> Index: lisp/files.el
APA> ===================================================================
APA> RCS file: /usr/CVSroot/XEmacs/xemacs/lisp/files.el,v
APA> retrieving revision 1.36
APA> diff -u -r1.36 files.el
APA> --- files.el 2000/07/15 00:44:50 1.36
APA> +++ files.el 2000/07/28 16:20:34
APA> @@ -878,24 +878,31 @@
APA> (defun insert-file-contents-literally (filename &optional visit beg end
replace)
APA> "Like `insert-file-contents', q.v., but only reads in the file.
APA> A buffer may be modified in several ways after reading into the buffer due
APA> -to advanced Emacs features, such as file-name-handlers, format decoding,
APA> -find-file-hooks, etc.
APA> +to advanced Emacs features, such as format decoding, character code
APA> +conversion,find-file-hooks, automatic uncompression, etc.
APA> +
APA> This function ensures that none of these modifications will take place."
APA> - (let ((file-name-handler-alist nil)
APA> - (format-alist nil)
APA> - (after-insert-file-functions nil)
APA> - (coding-system-for-read 'binary)
APA> - (find-buffer-file-type-function
APA> - (if (fboundp 'find-buffer-file-type)
APA> - (symbol-function 'find-buffer-file-type)
APA> - nil)))
APA> - (unwind-protect
APA> - (progn
APA> - (fset 'find-buffer-file-type (lambda (filename) t))
APA> - (insert-file-contents filename visit beg end replace))
APA> - (if find-buffer-file-type-function
APA> - (fset 'find-buffer-file-type find-buffer-file-type-function)
APA> - (fmakunbound 'find-buffer-file-type)))))
APA> + (let ((wrap-func (find-file-name-handler filename
APA> + 'insert-file-contents-literally)))
APA> + (if wrap-func
APA> + (funcall wrap-func 'insert-file-contents-literally filename
APA> + visit beg end replace)
APA> + (let ((file-name-handler-alist nil)
APA> + (format-alist nil)
APA> + (after-insert-file-functions nil)
APA> + (coding-system-for-read 'binary)
APA> + (coding-system-for-write 'binary)
APA> + (find-buffer-file-type-function
APA> + (if (fboundp 'find-buffer-file-type)
APA> + (symbol-function 'find-buffer-file-type)
APA> + nil)))
APA> + (unwind-protect
APA> + (progn
APA> + (fset 'find-buffer-file-type (lambda (filename) t))
APA> + (insert-file-contents filename visit beg end replace))
APA> + (if find-buffer-file-type-function
APA> + (fset 'find-buffer-file-type find-buffer-file-type-function)
APA> + (fmakunbound 'find-buffer-file-type)))))))
APA> (defun find-file-noselect (filename &optional nowarn rawfile)
APA> "Read file FILENAME into a buffer and return the buffer.
APA> cvs server: Diffing lisp/mule
APA> cvs server: Diffing lisp/term
APA> cvs server: Diffing lock
APA> cvs server: Diffing lwlib
APA> cvs server: Diffing man
APA> cvs server: Diffing man/internals
APA> cvs server: Diffing man/lispref
APA> cvs server: Diffing man/new-users-guide
APA> cvs server: Diffing man/xemacs
APA> cvs server: Diffing modules
APA> cvs server: Diffing modules/base64
APA> cvs server: Diffing modules/example
APA> cvs server: Diffing modules/ldap
APA> cvs server: Diffing modules/zlib
APA> cvs server: Diffing nt
APA> Compilation exited abnormally with code 1 at Fri Jul 28 18:17:12
APA> --
APA> Adrian Aichner <adrian(a)xemacs.org>