# HG changeset patch # User aidan # Date 1195140264 0 # Node ID fdf43260ae293f36bbde7dc0113d533644699052 # Parent bd9b678f4db720720b27c6e85351c467137a98d1 [xemacs-hg @ 2007-11-15 15:24:20 by aidan] Eliminate clean build build-failures on Mule diff -r bd9b678f4db7 -r fdf43260ae29 lisp/ChangeLog --- 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 + + * 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 * unicode.el (unicode-error-default-translation-table): diff -r bd9b678f4db7 -r fdf43260ae29 lisp/code-files.el --- 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))