From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#20545: New minor mode Electric Punct Date: Wed, 13 May 2015 23:32:57 -0700 Organization: UCLA Computer Science Department Message-ID: <55544199.3040704@cs.ucla.edu> References: <554FEFFE.7000303@cs.ucla.edu> <83k2wfma51.fsf@gnu.org> <555301BD.1040503@cs.ucla.edu> <83r3qkjuve.fsf@gnu.org> <5553822C.3000709@cs.ucla.edu> <83iobwjt3s.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060105020003040309060805" X-Trace: ger.gmane.org 1431585265 20719 80.91.229.3 (14 May 2015 06:34:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 May 2015 06:34:25 +0000 (UTC) Cc: 20545@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 14 08:34:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ysmii-00015f-TF for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 May 2015 08:34:13 +0200 Original-Received: from localhost ([::1]:52851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysmii-0007PK-6w for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 May 2015 02:34:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysmie-0007PE-Kz for bug-gnu-emacs@gnu.org; Thu, 14 May 2015 02:34:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsmiZ-0002I0-IY for bug-gnu-emacs@gnu.org; Thu, 14 May 2015 02:34:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsmiZ-0002Hj-Fi for bug-gnu-emacs@gnu.org; Thu, 14 May 2015 02:34:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YsmiY-0002jd-Pg for bug-gnu-emacs@gnu.org; Thu, 14 May 2015 02:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 May 2015 06:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20545 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 20545-submit@debbugs.gnu.org id=B20545.143158518910349 (code B ref 20545); Thu, 14 May 2015 06:34:02 +0000 Original-Received: (at 20545) by debbugs.gnu.org; 14 May 2015 06:33:09 +0000 Original-Received: from localhost ([127.0.0.1]:44274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ysmhg-0002gm-GL for submit@debbugs.gnu.org; Thu, 14 May 2015 02:33:09 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:60233) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ysmhd-0002g0-Hc for 20545@debbugs.gnu.org; Thu, 14 May 2015 02:33:06 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 61836A60002; Wed, 13 May 2015 23:32:59 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tFFxMIEehKqk; Wed, 13 May 2015 23:32:58 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D78B6A60001; Wed, 13 May 2015 23:32:57 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: <83iobwjt3s.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102761 Archived-At: This is a multi-part message in MIME format. --------------060105020003040309060805 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Eli Zaretskii wrote: > I fear it will just be a source of confusion. Well, 8-bit terminals are no longer that common (at least when developing Emacs) so it's no big deal either way, and as it's easier to do it without highlighting let's try it that way. A proposed patch is attached; it worked for me. Stefan Monnier wrote: > The real test is when the environment > uses utf-8 but the terminal's font fails to include the glyphs. That can easily happen with other characters, but in practice nowadays I think everybody has glyphs for curved quotes. This is in part due to Microsoft Windows putting curved quotes in their most-popular 8-bit character set starting with MS-Windows 1.0 in 1985. This put a lot of pressure on everybody else to support these glyphs one way or another, and it has been thirty years now.... --------------060105020003040309060805 Content-Type: text/x-patch; name="0001-Work-better-on-terminals-sans-curved-single-quotes.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename*0="0001-Work-better-on-terminals-sans-curved-single-quotes.patc"; filename*1="h" >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 --------------060105020003040309060805--