emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 496bfe7: ASCIIfy curved quotes on displays lacking


From: Paul Eggert
Subject: [Emacs-diffs] master 496bfe7: ASCIIfy curved quotes on displays lacking them
Date: Sat, 16 May 2015 21:20:12 +0000

branch: master
commit 496bfe74990d6601d3584cb900643aa77d7b7a78
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    ASCIIfy curved quotes on displays lacking them
    
    * 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 |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index fd892aa..4b63cb8 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]