X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/db4613576d3115aa320f0293d081ce98baa06acd..6dbbd98abb7c3327013dba57c058a6372b6628af:/lisp/international/mule.el diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 181474c65c..21ab7e176d 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1,6 +1,6 @@ ;;; mule.el --- basic commands for multilingual environment -;; Copyright (C) 1997-2015 Free Software Foundation, Inc. +;; Copyright (C) 1997-2016 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) @@ -665,8 +665,8 @@ without any conversions. VALUE is the EOL (end-of-line) format of the coding system. It must be one of `unix', `dos', `mac'. The symbol `unix' means Unix-like EOL -\(i.e. a single LF character), `dos' means DOS-like EOL \(i.e. a sequence -of CR followed by LF), and `mac' means Mac-like EOL \(i.e. a single CR). +\(i.e., a single LF character), `dos' means DOS-like EOL \(i.e., a sequence +of CR followed by LF), and `mac' means Mac-like EOL \(i.e., a single CR). If omitted, Emacs detects the EOL format automatically when decoding. `:charset-list' (required if `:coding-type' is `charset' or `shift-jis') @@ -1445,42 +1445,35 @@ graphical terminals." (let ((coding-type (coding-system-type coding-system)) (saved-meta-mode (terminal-parameter terminal 'keyboard-coding-saved-meta-mode))) - (if (not (eq coding-type 'raw-text)) - (let (accept-8-bit) - (if (not (or (coding-system-get coding-system :suitable-for-keyboard) - (coding-system-get coding-system :ascii-compatible-p))) - (error "Unsuitable coding system for keyboard: %s" coding-system)) - (cond ((memq coding-type '(charset utf-8 shift-jis big5 ccl)) - (setq accept-8-bit t)) - ((eq coding-type 'iso-2022) - (let ((flags (coding-system-get coding-system :flags))) - (or (memq '7-bit flags) - (setq accept-8-bit t)))) - (t - (error "Unsupported coding system for keyboard: %s" - coding-system))) - (if accept-8-bit - (progn - (or saved-meta-mode - (set-terminal-parameter terminal - 'keyboard-coding-saved-meta-mode - (cons (nth 2 (current-input-mode)) - nil))) - (set-input-meta-mode 8 terminal)) - (when saved-meta-mode - (set-input-meta-mode (car saved-meta-mode) terminal) - (set-terminal-parameter terminal - 'keyboard-coding-saved-meta-mode - nil))) - ;; Avoid end-of-line conversion. - (setq coding-system - (coding-system-change-eol-conversion coding-system 'unix))) - - (when saved-meta-mode - (set-input-meta-mode (car saved-meta-mode) terminal) - (set-terminal-parameter terminal - 'keyboard-coding-saved-meta-mode - nil)))) + (let (accept-8-bit) + (if (not (or (coding-system-get coding-system :suitable-for-keyboard) + (coding-system-get coding-system :ascii-compatible-p))) + (error "Unsuitable coding system for keyboard: %s" coding-system)) + (cond ((memq coding-type '(raw-text charset utf-8 shift-jis big5 ccl)) + (setq accept-8-bit t)) + ((eq coding-type 'iso-2022) + (let ((flags (coding-system-get coding-system :flags))) + (or (memq '7-bit flags) + (setq accept-8-bit t)))) + (t + (error "Unsupported coding system for keyboard: %s" + coding-system))) + (if accept-8-bit + (progn + (or saved-meta-mode + (set-terminal-parameter terminal + 'keyboard-coding-saved-meta-mode + (cons (nth 2 (current-input-mode)) + nil))) + (set-input-meta-mode 8 terminal)) + (when saved-meta-mode + (set-input-meta-mode (car saved-meta-mode) terminal) + (set-terminal-parameter terminal + 'keyboard-coding-saved-meta-mode + nil))) + ;; Avoid end-of-line conversion. + (setq coding-system + (coding-system-change-eol-conversion coding-system 'unix)))) (set-keyboard-coding-system-internal coding-system terminal) (setq keyboard-coding-system coding-system)) @@ -2002,7 +1995,7 @@ use \"coding: 'raw-text\" instead." (goto-char pos) (when (and set-auto-coding-for-load (re-search-forward re-unibyte tail-end t)) - (display-warning 'mule "`unibyte: t' is obsolete; \ + (display-warning 'mule "\"unibyte: t\" is obsolete; \ use \"coding: 'raw-text\" instead." :warning) (setq coding-system 'raw-text)) (when (and (not coding-system)