]> git.eshelyaron.com Git - emacs.git/commitdiff
ASCIIfy curved quotes on displays lacking them
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 May 2015 20:47:36 +0000 (13:47 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 May 2015 21:20:00 +0000 (14:20 -0700)
* lisp/international/mule-cmds.el (set-locale-environment):
If curved quotes don't work, display straight ASCII approximations
(Bug#20545).

lisp/international/mule-cmds.el

index fd892aaefec612f732b186376d784573e427ae7a..4b63cb8f565ea1a2ca28c847f6735237bcecf7c9 100644 (file)
@@ -2708,6 +2708,14 @@ See also `locale-charset-language-names', `locale-language-names',
        (set-terminal-coding-system 'utf-8)
        (set-keyboard-coding-system 'utf-8)))
 
+    ;; If curved quotes don't work, display straight ASCII approximations.
+    (unless frame
+      (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)))))
+
     ;; Default to A4 paper if we're not in a C, POSIX or US locale.
     ;; (See comments in Flocale_info.)
     (unless frame