diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-04-18 14:05:31 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-04-18 14:05:31 -0700 |
commit | 0808f2a1a331fbcb2e6ab57894502b0a34311869 (patch) | |
tree | 72386004f3d60a5fdbaf1176edeb38ba4083677e /lisp/international | |
parent | 3aa73b04e81ebc396892b14e5e9fa78a13ff85d1 (diff) | |
parent | ac00a92e3df7111c0eb2c6456ae7df5850bfd8fa (diff) |
Merge from origin/emacs-25
ac00a92 Make sh-electric-here-document-mode accessible in sh-mode-hoo...
3287f48 ; Add entry to MAINTAINERS
b85981f * configure.ac (HAVE_MODULES): Exclude gnu-kfreebsd from prev...
0f33284 Make use of rectangle-preview custom variable.
aa0d83a Make use of rectangle-preview face.
33bef6e Use 'grep-find-program' in check-declare.el
a8560e5 Improve "C-h S" for cl-lib symbols
52e798b Fix minor issues with removing left or right fringes
d6ffd64 Speed up redisplay in ansi-term mode
4ab671c Simplify 8-bit character handling by terminal for 'raw-text'
f3653ec * configure.ac (HAVE_MODULES): Treat gnu like gnu-linux. (Bu...
ab849b7 Fix w32 memory-management problem when extending buffer text
Diffstat (limited to 'lisp/international')
-rw-r--r-- | lisp/international/mule.el | 65 |
1 files changed, 29 insertions, 36 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 60a90ae15a..21ab7e176d 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -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)) |