Function: dos-codepage-setup
dos-codepage-setup is an interactive and byte-compiled function
defined in internal.el.gz.
Signature
(dos-codepage-setup)
Documentation
Set up multilingual environment for the installed DOS codepage.
This function sets coding systems, display tables, and the language
environment options as appropriate for the current value of dos-codepage.
This function is automatically run at startup via the after-init-hook
list. You can (and should) also run it if and when the value of
dos-codepage changes.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/term/internal.el.gz
(defun dos-codepage-setup ()
"Set up multilingual environment for the installed DOS codepage.
This function sets coding systems, display tables, and the language
environment options as appropriate for the current value of `dos-codepage'.
This function is automatically run at startup via the `after-init-hook'
list. You can (and should) also run it if and when the value of
`dos-codepage' changes."
(interactive)
(let ((locale (cdr (assq dos-country-code dos-locale-alist)))
(coding (format "cp%s" dos-codepage))
coding-dos coding-unix)
(setq coding-dos (intern (format "%s-dos" coding))
coding-unix (intern (format "%s-unix" coding)))
(setq locale (if locale
(format "%s.cp%s" locale dos-codepage)
"en_US.cp437"))
(set-locale-environment locale)
(set-selection-coding-system coding-dos)
(IT-setup-unicode-display coding-unix)
(prefer-coding-system coding-dos)
(setq unibyte-display-via-language-environment t)
;; Some codepages have sporadic support for Latin-1, Greek, and
;; symbol glyphs, which don't belong to their native character
;; set. It's a nuisance to have all those glyphs here, for all
;; the codepages (for starters, I don't even have references for
;; all the codepages). So provide a hook for those who want to
;; squeeze every bit of support out of their terminal/font.
(run-hooks 'dos-codepage-setup-hook)
))