yatex

changeset 266:9d022a531549 dev

Set buffer-file-coding-system for write at tfb-and-exit.
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 29 Feb 2012 10:45:01 +0900
parents 0b10d1fea265
children 388eaa8b695a
files yatexlib.el
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/yatexlib.el	Wed Feb 29 10:43:24 2012 +0900
     1.2 +++ b/yatexlib.el	Wed Feb 29 10:45:01 2012 +0900
     1.3 @@ -2,7 +2,7 @@
     1.4  ;;; YaTeX and yahtml common libraries, general functions and definitions
     1.5  ;;; yatexlib.el
     1.6  ;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org]
     1.7 -;;; Last modified Fri Feb 17 17:15:37 2012 on firestorm
     1.8 +;;; Last modified Wed Feb 29 09:49:30 2012 on firestorm
     1.9  ;;; $Id$
    1.10  
    1.11  ;; General variables
    1.12 @@ -1568,7 +1568,15 @@
    1.13  		 (lambda (arg)
    1.14  		   (find-file arg)
    1.15  		   (texinfo-format-buffer)
    1.16 -		   (basic-save-buffer)))
    1.17 +		   (cond
    1.18 +		    ((fboundp 'set-buffer-file-coding-system)
    1.19 +		     (set-buffer-file-coding-system 'sjis-dos))
    1.20 +		    ((fboundp 'set-file-coding-system)
    1.21 +		     (set-file-coding-system '*sjis*dos))
    1.22 +		    ((boundp 'NEMACS)
    1.23 +		     (set (make-local-variable 'kanji-fileio-code) 1)))
    1.24 +		   (let ((coding-system-for-write buffer-file-coding-system))
    1.25 +		     (basic-save-buffer))))
    1.26  		command-line-args-left)
    1.27  	(kill-emacs))))
    1.28