Mercurial > hg > xemacs-beta
changeset 4271:fdf43260ae29
[xemacs-hg @ 2007-11-15 15:24:20 by aidan]
Eliminate clean build build-failures on Mule
author | aidan |
---|---|
date | Thu, 15 Nov 2007 15:24:24 +0000 |
parents | bd9b678f4db7 |
children | a75979634ce3 |
files | lisp/ChangeLog lisp/code-files.el |
diffstat | 2 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Nov 15 10:05:16 2007 +0000 +++ b/lisp/ChangeLog Thu Nov 15 15:24:24 2007 +0000 @@ -1,3 +1,13 @@ +2007-11-15 Aidan Kehoe <kehoea@parhasard.net> + + * code-files.el (write-region): + Call #'find-coding-system on the (possible) coding system argument + before checking it with #'coding-system-p; the latter function + gives false results when passed coding system names as symbols. + + Preserve the old order of determination of the coding system + better. + 2007-11-14 Aidan Kehoe <kehoea@parhasard.net> * unicode.el (unicode-error-default-translation-table):
--- a/lisp/code-files.el Thu Nov 15 10:05:16 2007 +0000 +++ b/lisp/code-files.el Thu Nov 15 15:24:24 2007 +0000 @@ -559,14 +559,19 @@ 'write-region-pre-hook start end filename append visit lockname coding-system-or-mustbenew) - coding-system + (if (and coding-system-or-mustbenew + (coding-system-p + (find-coding-system coding-system-or-mustbenew))) + coding-system-or-mustbenew) buffer-file-coding-system (find-file-coding-system-for-write-from-filename filename))) (if (consp hook-result) ;; One of the `write-region-pre-hook' functions wrote the file. hook-result ;; The hooks didn't do the work; do it ourselves. - (setq mustbenew (unless (coding-system-p coding-system-or-mustbenew) + (setq hook-result (find-coding-system hook-result) + mustbenew (unless (coding-system-p + (find-coding-system coding-system-or-mustbenew)) coding-system-or-mustbenew) coding-system (cond ((coding-system-p hook-result) hook-result) ((null mustbenew) coding-system-or-mustbenew))