Mercurial > hg > xemacs-beta
changeset 5101:65f5d45edc87
fix auto-autoloads when default coding system is utf-8
-------------------- ChangeLog entries follow: --------------------
lisp/ChangeLog addition:
2010-02-26 Ben Wing <ben@xemacs.org>
* autoload.el (autoload-featurep-protect-autoloads):
Always insert a coding-system cookie, either raw-text-unix or
escape-quoted. As before, insert an error statement when an
escape-quoted auto-autoload is loaded in a non-Mule XEmacs.
This fixes problems when the default coding system is UTF-8,
as in Cygwin. Under some circumstances, the file can get
written out as raw text and read in as UTF-8, where invididual
high-bytes are usually invalid UTF-8 sequences and lead to
error octets in the buffer; when written out again, these
force escape-quoted. Result: auto-autoloads.el for the
source-tree lisp/ directory would end up as escape-quoted.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Fri, 26 Feb 2010 07:44:49 -0600 |
parents | 5502045ec510 |
children | ec6e767f8fc5 |
files | lisp/ChangeLog lisp/autoload.el |
diffstat | 2 files changed, 22 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Feb 25 16:19:01 2010 +0100 +++ b/lisp/ChangeLog Fri Feb 26 07:44:49 2010 -0600 @@ -1,3 +1,18 @@ +2010-02-26 Ben Wing <ben@xemacs.org> + + * autoload.el (autoload-featurep-protect-autoloads): + Always insert a coding-system cookie, either raw-text-unix or + escape-quoted. As before, insert an error statement when an + escape-quoted auto-autoload is loaded in a non-Mule XEmacs. + + This fixes problems when the default coding system is UTF-8, + as in Cygwin. Under some circumstances, the file can get + written out as raw text and read in as UTF-8, where invididual + high-bytes are usually invalid UTF-8 sequences and lead to + error octets in the buffer; when written out again, these + force escape-quoted. Result: auto-autoloads.el for the + source-tree lisp/ directory would end up as escape-quoted. + 2010-02-25 Didier Verna <didier@xemacs.org> The background-placement face property. @@ -16,7 +31,7 @@ * frame.el (frame-background-placement-instance): * objects.el (make-face-background-placement-specifier): New. -c2010-02-25 Ben Wing <ben@xemacs.org> +2010-02-25 Ben Wing <ben@xemacs.org> * autoload.el (make-autoload): Call cl-function-arglist with one arg.
--- a/lisp/autoload.el Thu Feb 25 16:19:01 2010 +0100 +++ b/lisp/autoload.el Fri Feb 26 07:44:49 2010 -0600 @@ -1088,11 +1088,13 @@ ;; recognized only one of the two magic-cookie styles (the -*- kind) ;; in find-file, but both of them in load. We go ahead and put both ;; in, just to be safe. + (insert (format " -*- coding: %s -*-\n" buffer-file-coding-system)) (when (eq buffer-file-coding-system 'escape-quoted) - (insert " -*- coding: escape-quoted; -*- -\(or (featurep 'mule) (error \"Loading this file requires Mule support\")) -;;;###coding system: escape-quoted")) - (insert "\n(if (featurep '" sym ")") + (insert "(or (featurep 'mule) ") + (insert "(error \"Loading this file requires Mule support\"))\n")) + (insert (format ";;;###coding system: %s\n" + buffer-file-coding-system)) + (insert "(if (featurep '" sym ")") (insert " (error \"Feature " sym " already loaded\"))\n") (goto-char (point-max)) (save-excursion