summaryrefslogtreecommitdiff
path: root/lisp/term/w32console.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-05-17 18:33:22 +0300
committerEli Zaretskii <eliz@gnu.org>2015-05-17 18:33:22 +0300
commita0cfd563d26661ce2a509e525487644fd421966b (patch)
treeb8dbb6751c06109a4a766173b635a72268fcc65d /lisp/term/w32console.el
parent05e69458e7de94b936f128a4e3691e4bd699f475 (diff)
downloademacs-a0cfd563d26661ce2a509e525487644fd421966b.tar.gz
MS-Windows followup for ASCIIfication of curved quotes
* lisp/term/w32console.el (terminal-init-w32console): Repeat the test for curved quotes being displayable, after switching the terminal encoding. (Bug#20545)
Diffstat (limited to 'lisp/term/w32console.el')
-rw-r--r--lisp/term/w32console.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/term/w32console.el b/lisp/term/w32console.el
index a7056cd5edf..29ab2f16e1c 100644
--- a/lisp/term/w32console.el
+++ b/lisp/term/w32console.el
@@ -65,7 +65,15 @@
(when oem-cs-p
(set-keyboard-coding-system oem-code-page-coding)
(set-terminal-coding-system
- (if oem-o-cs-p oem-code-page-output-coding oem-code-page-coding))))
+ (if oem-o-cs-p oem-code-page-output-coding oem-code-page-coding))
+ ;; Since we changed the terminal encoding, we need to repeat
+ ;; the test for Unicode quotes being displayable.
+ (dolist (char-repl
+ '((?‘ . [?\']) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"])))
+ (when (not (char-displayable-p (car char-repl)))
+ (or standard-display-table
+ (setq standard-display-table (make-display-table)))
+ (aset standard-display-table (car char-repl) (cdr char-repl))))))
(let* ((colors w32-tty-standard-colors)
(color (car colors)))
(tty-color-clear)