>From dd42a7ba816df0d209c0f1e965ee036c62c0337a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 May 2015 23:15:23 -0700 Subject: [PATCH] Work better on terminals sans curved single quotes * lisp/international/mule-cmds.el (set-locale-environment): If single quotation marks are not displayable, show ASCII approximations instead. --- lisp/international/mule-cmds.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index fd892aa..2805671 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2708,6 +2708,13 @@ See also `locale-charset-language-names', `locale-language-names', (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8))) + ;; If single quotation marks don't work, display ASCII approximations. + (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 -- 2.1.0