Commits

Anonymous committed 9b2c159

2002-09-07 Mike Fabian <mfabian@suse.de>

* start-files/ja/locale-start.el (command-line-do-help):
Use the correct encoding for the output of
'LC_ALL=ja_JP.eucJP xemacs --help',
'LC_ALL=ja_JP.UTF-8 xemacs --help', and
'LC_ALL=ja_JP.SJIS xemacs --help'.

Message-ID: <s3tit1h6h29.fsf_-_@gregory.suse.de>

Comments (0)

Files changed (2)

+2002-09-07  Mike Fabian  <mfabian@suse.de>
+
+	* start-files/ja/locale-start.el (command-line-do-help):
+	Use the correct encoding for the output of
+	'LC_ALL=ja_JP.eucJP xemacs --help',
+	'LC_ALL=ja_JP.UTF-8 xemacs --help', and
+	'LC_ALL=ja_JP.SJIS xemacs --help'.
+
 2002-01-23  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* Makefile (.el.elc): Remove special .el.elc rules.

start-files/ja/locale-start.el

 
 (defun command-line-do-help (arg)
   "Print the XEmacs usage message and exit."
+  (let ((charmap (shell-command-to-string "locale charmap")))
+    (cond ((string-match "UTF-8" charmap)
+	   (require 'un-define)
+	   (set-terminal-coding-system 'utf-8))
+	  ((string-match "EUC-JP" charmap)
+	   (set-terminal-coding-system 'euc-jp))
+	  ((string-match "SHIFT_JIS" charmap)
+	   (set-terminal-coding-system 'shift_jis))))
   (let ((standard-output 'external-debugging-output))
     (princ (concat "\n" (emacs-version) "\n\n"))
     (princ