]> code.delx.au - gnu-emacs/commitdiff
MS-Windows followup for ASCIIfication of curved quotes
authorEli Zaretskii <eliz@gnu.org>
Sun, 17 May 2015 15:33:22 +0000 (18:33 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 17 May 2015 15:33:22 +0000 (18:33 +0300)
* lisp/term/w32console.el (terminal-init-w32console): Repeat the
test for curved quotes being displayable, after switching the
terminal encoding.  (Bug#20545)

lisp/term/w32console.el

index a7056cd5edf0cd7f758d286fae8be2589feeddca..29ab2f16e1c38d44558e358516da4d42152633f5 100644 (file)
        (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)