summaryrefslogtreecommitdiff
path: root/lisp/international/mule-cmds.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-03-27 17:29:43 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-03-27 17:29:43 +0000
commita0a7e8c6de361d15703e78a1e934d0347475dcb8 (patch)
treebea99880ecb2d7b242c5fdddb69583b3d686e22b /lisp/international/mule-cmds.el
parentcd5caccf0c791bcaa19190f5d62ace1ebe9987c8 (diff)
parent99a5658144bce7733e48d9c1877b2795afc1aa9d (diff)
downloademacs-a0a7e8c6de361d15703e78a1e934d0347475dcb8.tar.gz
Merged from miles@gnu.org--gnu-2005 (patch 204-213)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-204 Clean up gdb-ui breakpoint faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-205 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-206 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-207 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-208 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-209 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-210 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-211 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-212 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-213 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-319
Diffstat (limited to 'lisp/international/mule-cmds.el')
-rw-r--r--lisp/international/mule-cmds.el18
1 files changed, 13 insertions, 5 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 48434169ef5..86665d31ba8 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1734,7 +1734,7 @@ The default status is as follows:
(reset-language-environment)
-(defun set-display-table-and-terminal-coding-system (language-name)
+(defun set-display-table-and-terminal-coding-system (language-name &optional coding-system)
"Set up the display table and terminal coding system for LANGUAGE-NAME."
(let ((coding (get-language-info language-name 'unibyte-display)))
(if coding
@@ -1748,7 +1748,7 @@ The default status is as follows:
(dotimes (i 128)
(aset standard-display-table (+ i 128) nil))))
(or (eq window-system 'pc)
- (set-terminal-coding-system coding))))
+ (set-terminal-coding-system (or coding-system coding)))))
(defun set-language-environment (language-name)
"Set up multi-lingual environment for using LANGUAGE-NAME.
@@ -2446,7 +2446,8 @@ See also `locale-charset-language-names', `locale-language-names',
;; we are using single-byte characters,
;; so the display table and terminal coding system are irrelevant.
(when default-enable-multibyte-characters
- (set-display-table-and-terminal-coding-system language-name))
+ (set-display-table-and-terminal-coding-system
+ language-name coding-system))
;; Set the `keyboard-coding-system' if appropriate (tty
;; only). At least X and MS Windows can generate
@@ -2476,9 +2477,16 @@ See also `locale-charset-language-names', `locale-language-names',
(set-keyboard-coding-system code-page-coding)
(set-terminal-coding-system code-page-coding))))
- ;; On Darwin, file names are always encoded in utf-8, no matter the locale.
(when (eq system-type 'darwin)
- (setq default-file-name-coding-system 'utf-8))
+ ;; On Darwin, file names are always encoded in utf-8, no matter
+ ;; the locale.
+ (setq default-file-name-coding-system 'utf-8)
+ ;; Mac OS X's Terminal.app by default uses utf-8 regardless of
+ ;; the locale.
+ (when (and (null window-system)
+ (equal (getenv "TERM_PROGRAM") "Apple_Terminal"))
+ (set-terminal-coding-system 'utf-8)
+ (set-keyboard-coding-system 'utf-8)))
;; Default to A4 paper if we're not in a C, POSIX or US locale.
;; (See comments in Flocale_info.)