Mercurial > hg > xemacs-beta
comparison lisp/mule/mule-tty-init.el @ 333:4f79e16b1112 r21-0-64
Import from CVS: tag r21-0-64
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:49:50 +0200 |
parents | |
children | 7039e6323819 |
comparison
equal
deleted
inserted
replaced
332:bb75ebac9531 | 333:4f79e16b1112 |
---|---|
1 ;;; mule-tty-init.el --- Initialization code for console tty under MULE | |
2 | |
3 ;; Copyright (C) 1998 Free Software Foundation, Inc. | |
4 ;; Copyright (C) 1998 Kazuyuki IENAGA <kazz@imasy.or.jp> | |
5 | |
6 ;; Author: Kazuyuki IENAGA <kazz@imasy.or.jp> | |
7 ;; Keywords: mule, tty, console, dumped | |
8 | |
9 ;; This file is part of XEmacs. | |
10 ;; | |
11 ;; XEmacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 ;; | |
16 ;; XEmacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 ;; | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with XEmacs; see the file COPYING. If not, write to the | |
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
24 ;; Boston, MA 02111-1307, USA. | |
25 | |
26 ;;; Commentary: | |
27 | |
28 ;; This file is dumped with XEmacs when Mule and TTY support are enabled. | |
29 | |
30 ;;; Code: | |
31 | |
32 (defvar mule-tty-win-initted nil) | |
33 | |
34 (defun init-mule-tty-win () | |
35 "Initialize TTY for MULE at startup. Don't call this." | |
36 (unless mule-tty-win-initted | |
37 (add-hook | |
38 'before-init-hook | |
39 (lambda () | |
40 (when (eq (device-type) 'tty) | |
41 (when (string-match "^kterm" (getenv "TERM")) | |
42 (set-terminal-coding-system 'euc-jp) | |
43 (set-keyboard-coding-system 'euc-jp)) | |
44 (set-console-tty-coding-system)))) | |
45 (setq mule-tty-win-initted t))) | |
46 | |
47 ;;; mule-tty-init.el ends here |