Mercurial > emacs
comparison lisp/international/mule-cmds.el @ 21856:68e39b75b862
(set-language-environment): Fix previous change.
Call standard-display-european-internal.
Call set-terminal-coding-system.
(standard-display-european-internal): New subroutine.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 30 Apr 1998 03:20:24 +0000 |
parents | 9693cb3a0f9d |
children | 4fb3860a1f26 |
comparison
equal
deleted
inserted
replaced
21855:be75888c203f | 21856:68e39b75b862 |
---|---|
841 (setq language-name (symbol-name language-name))) | 841 (setq language-name (symbol-name language-name))) |
842 (setq language-name "English")) | 842 (setq language-name "English")) |
843 (if (null (get-language-info language-name 'setup-function)) | 843 (if (null (get-language-info language-name 'setup-function)) |
844 (error "Language environment not defined: %S" language-name)) | 844 (error "Language environment not defined: %S" language-name)) |
845 (unless default-enable-multibyte-characters | 845 (unless default-enable-multibyte-characters |
846 (or (member (downcase language) | 846 (or (member (downcase language-name) |
847 '("latin-1" "latin-2" "latin-3" "latin-4" "latin-5")) | 847 '("latin-1" "latin-2" "latin-3" "latin-4" "latin-5")) |
848 (error "Language environment `%s' not supported in unibyte mode")) | 848 (error "Language environment `%s' not supported in unibyte mode" |
849 (standard-display-european 1 (downcase language))) | 849 language-name)) |
850 (set-terminal-coding-system (intern (downcase language-name))) | |
851 (standard-display-european-internal)) | |
850 | 852 |
851 (if current-language-environment | 853 (if current-language-environment |
852 (let ((func (get-language-info current-language-environment | 854 (let ((func (get-language-info current-language-environment |
853 'exit-function))) | 855 'exit-function))) |
854 (run-hooks 'exit-language-environment-hook) | 856 (run-hooks 'exit-language-environment-hook) |
855 (if (fboundp func) (funcall func)))) | 857 (if (fboundp func) (funcall func)))) |
856 (setq current-language-environment language-name) | 858 (setq current-language-environment language-name) |
857 (funcall (get-language-info language-name 'setup-function)) | 859 (funcall (get-language-info language-name 'setup-function)) |
858 (run-hooks 'set-language-environment-hook) | 860 (run-hooks 'set-language-environment-hook) |
859 (force-mode-line-update t)) | 861 (force-mode-line-update t)) |
862 | |
863 (defun standard-display-european-internal () | |
864 ;; Actually set up direct output of non-ASCII characters. | |
865 (standard-display-8bit 160 255) | |
866 ;; Make non-line-break space display as a plain space. | |
867 ;; Most X fonts do the wrong thing for code 160. | |
868 (aset standard-display-table 160 [32]) | |
869 ;; Most Windows programs send out apostrophe's as \222. Most X fonts | |
870 ;; don't contain a character at that position. Map it to the ASCII | |
871 ;; apostrophe. | |
872 (aset standard-display-table 146 [39])) | |
860 | 873 |
861 (defun set-language-environment-coding-systems (language-name) | 874 (defun set-language-environment-coding-systems (language-name) |
862 "Do various coding system setups for language environment LANGUAGE-NAME." | 875 "Do various coding system setups for language environment LANGUAGE-NAME." |
863 (let* ((priority (get-language-info language-name 'coding-priority)) | 876 (let* ((priority (get-language-info language-name 'coding-priority)) |
864 (default-coding (car priority))) | 877 (default-coding (car priority))) |