comparison lisp/mule/mule-cmds.el @ 3142:77f5a5135b3a

[xemacs-hg @ 2005-12-17 19:46:57 by aidan] Fix self-insert-command with X11 input methods. Addresses Zhang Wei's problem of 871x118lc4.fsf@gmail.com.
author aidan
date Sat, 17 Dec 2005 19:47:03 +0000
parents adda8fccb13d
children a2331a8fccb5
comparison
equal deleted inserted replaced
3141:66c42fc5d26b 3142:77f5a5135b3a
1269 (maybe-change-coding-system-with-eol native eol-type)) 1269 (maybe-change-coding-system-with-eol native eol-type))
1270 (error 1270 (error
1271 (warn "Invalid native-coding-system %s in language environment %s" 1271 (warn "Invalid native-coding-system %s in language environment %s"
1272 native language-name))) 1272 native language-name)))
1273 (define-coding-system-alias 'file-name 'native) 1273 (define-coding-system-alias 'file-name 'native)
1274 ;; Set the default keyboard and terminal coding systems to the native
1275 ;; coding system of the language environment.
1276 ;;
1277 (setq keyboard-coding-system native
1278 terminal-coding-system native)
1279
1280 ;; And do the same for any TTYs.
1281 (dolist (con (console-list))
1282 (when (eq 'tty (device-type (car (console-device-list con))))
1283 ;; Calling set-input-mode at the same time would be a sane thing
1284 ;; to do here. I would prefer to default to accepting eight bit
1285 ;; input and not using the top bit for Meta.
1286 (set-console-tty-coding-system con native)))
1287
1274 ;; process output should not have EOL conversion. under MS Windows 1288 ;; process output should not have EOL conversion. under MS Windows
1275 ;; and Cygwin, this screws things up (`cmd' is fine with just LF and 1289 ;; and Cygwin, this screws things up (`cmd' is fine with just LF and
1276 ;; `bash' chokes on CR-LF). 1290 ;; `bash' chokes on CR-LF).
1277 (setq default-process-coding-system 1291 (setq default-process-coding-system
1278 (cons (car default-process-coding-system) native))))) 1292 (cons (car default-process-coding-system) native)))))
1325 ;; user-default locale even if the langenv doesn't correspond; 1339 ;; user-default locale even if the langenv doesn't correspond;
1326 ;; we might not be able to find a langenv for the user-default 1340 ;; we might not be able to find a langenv for the user-default
1327 ;; locale but we should still use the right code page, etc. 1341 ;; locale but we should still use the right code page, etc.
1328 (declare-fboundp (mswindows-set-current-locale userdef))) 1342 (declare-fboundp (mswindows-set-current-locale userdef)))
1329 ;; Unix: 1343 ;; Unix:
1330 (let ((locstring (set-current-locale ""))) 1344 (let ((locstring (current-locale)))
1331 ;; assume C lib locale and LANG env var are set correctly. use 1345 ;; assume C lib locale and LANG env var are set correctly. use
1332 ;; them to find the langenv. 1346 ;; them to find the langenv.
1333 (setq langenv 1347 (setq langenv
1334 (and locstring (get-language-environment-from-locale 1348 (and locstring (get-language-environment-from-locale
1335 locstring))))) 1349 locstring)))))