[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [address@hidden: Emacs Foreign Language editing and printing.]
From: |
Kenichi Handa |
Subject: |
Re: [address@hidden: Emacs Foreign Language editing and printing.] |
Date: |
Wed, 7 Mar 2001 14:20:58 +0900 (JST) |
Richard Stallman <rms@gnu.org> writes:
> Should some of this be documented in the Emacs manual?
> Or perhaps in PROBLEMS or some other file in the distribution?
[...]
> ------- Start of forwarded message -------
> From: Peter Andrew Hanson <pehanson@indiana.edu>
> Subject: Emacs Foreign Language editing and printing.
[...]
Thank you for the report.
> First insert the following in your .cshrc or .tcshrc file:
> xset fp+ /usr/local/share/emacs/fonts
> xset fp rehash
The above is ok, and is worth describing at somewhere.
> xset fp+ /usr/local/share/emacs/fonts/bdf
> xset fp rehash
The above is useless.
> Second insert the following in your .emacs file (sample is for ChineseGB):
> ;;--------------------------------------------------------- ;;
> (autoload 'c2gbstrt "c2gbstrt"
> "Start Chinese Mandarin GB character environment.\n" t)
> ;;
> ;;
> (defun c2gbstrt ()
> (interactive)
> (progn
> (setq message-log-max 4)
> (setq ps-multibyte-buffer 'bdf-font)
> (setq bdf-directory-list '("/usr/local/share/emacs/fonts/bdf"))
> (setup-chinese-gb-environment)
The above line is not necessary if you have the following line.
> (set-language-environment 'Chinese-GB)
> (set-terminal-coding-system 'euc-china-unix)
The above line should be recommended only for a chinese
capable terminal user.
> ;; The following line is commented out . . .
> ;; (set-buffer-process-coding-system 'euc-china-unix 'euc-china-unix)
> (set-buffer-file-coding-system 'euc-china-unix)
The above line is usually useless because euc-china-unix is
set only for the current buffer (perhaps *scratch*).
> (set-terminal-coding-system 'euc-china-unix)
Why again?
> (set-keyboard-coding-system 'euc-china-unix)
Perhaps, the above line is good to recommend to all Chinese
users.
> (set-input-method 'chinese-tonepy)
This activates the input method. But, I think what poeple
want is to set the default input method turned on by C-\.
> (mule-diag)))
What for?
> ;; or (for ChineseBIG5):
[...]
> (set-input-method 'chinese-tonepy)
We should not recommend GB char input method to Big5 users.
> Then start emacs with the following command:
> emacs -fn fontset-standard --multibyte &
> After emacs starts with the above command hit "escape key" then "X key"
> and enter c2gbstrt this would start emacs chineseGB or enter c2b5strt this
> would start emacs chineseBIG5 and allow postscript printing of the Chinese
> output.
As Emacs now respects locale, the better advice for Chinese
users is to set LANG correctly. And, even for a people who
runs Emacs on a system that doesn't support Chinese locale,
it is better to advice to use C-x RET l chinese-gb RET or
C-x RET l chinese-big5 RET.
To summarize, if we dare to write this kind of advice
somewhere, it should be something like below:
(1) Install intlfonts (available at all GNU FTP mirror sites).
The default installation path is /usr/local/share/emacs/fonts.
(2) Put the following lines in your .emacs.
;;----------------------------------------------------------------------
(setq bdf-directory-list '("/usr/local/share/emacs/fonts/bdf"))
(defun my-chinese-setup ()
"Do various setups for Chinese-GB and Chinese-BIG5 language environment."
(cond ((equal current-language-environment "Chinese-GB")
;; Change "chinese-tonepy" to what you prefer for
;; inputting GB characters.
(setq default-input-method "chinese-tonepy")
;; If you are using a GB capable terminal,
;; uncomment the next line.
;; (set-terminal-coding-system 'euc-china)
(set-keyboard-coding-system 'euc-china)
;; If you want to print a buffer to PostScript printer by
;; BDF bitmap fonts, uncomment the next line.
;; (setq ps-multibyte-buffer 'bdf-font)
)
((equal current-language-environment "Chinese-BIG5")
;; Change "chinese-tonepy" to what you prefer for
;; inputting Big5 characters.
(setq default-input-method "chinese-py-b5")
;; If you are using a Big5 capable terminal,
;; uncomment the next line.
;; (set-terminal-coding-system 'big5)
(set-keyboard-coding-system 'big5-unix)
;; If you want to print a buffer to PostScript printer by
;; BDF bitmap fonts, uncomment the next line.
;; (setq ps-multibyte-buffer 'bdf-font)
)))
(add-hook 'set-language-environment-hook 'my-chinese-setup)
;;----------------------------------------------------------------------
(3) Start Emacs as below:
% emacs -fn fontset-standard
(4) If you are not in your preferfed Chinese language
environment, switch to that by:
C-x RET l chinese-gb RET or C-x RET l chinese-big5 RET.
---
Ken'ichi HANDA
handa@etl.go.jp
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [address@hidden: Emacs Foreign Language editing and printing.],
Kenichi Handa <=