unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 20545@debbugs.gnu.org
Subject: bug#20545: New minor mode Electric Punct
Date: Wed, 13 May 2015 07:49:47 -0700	[thread overview]
Message-ID: <5553648B.60602@cs.ucla.edu> (raw)
In-Reply-To: <jwvoalok4kv.fsf-monnier+emacsbugs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

Stefan Monnier wrote:

> Hmm... is it really Emacs that displayed it like this?  Or is it the
> terminal which did it?  If it's Emacs, then I wonder how it figured it
> needed to do that

I haven't looked at the details, but I expect Emacs looks at the locale and 
discovers that it's unibyte.  At least, that's how I did it: by starting xterm 
in an Ubuntu 15.04 environment where LC_ALL=en_US.iso885915, and then running 
emacs -nw under xterm.  In this situation, the attached patch to Emacs (which 
would have to be improved before installing) has the behavior of using 
underlined ` and ' to render curved single quotes.


[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 412 bytes --]

diff --git a/src/term.c b/src/term.c
index d2a9c3d..86ca4d8 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1867,6 +1867,10 @@ produce_glyphless_glyph (struct it *it, Lisp_Object acronym)
 			  : it->c <= MAX_UNICODE_CHAR ? "\\U%06X"
 			  : "\\x%06X"),
 			 it->c + 0u);
+	  if (it->c == 0x2018)
+	    buf[0] = '`', len = 1;
+	  else if (it->c == 0x2019)
+	    buf[0] = '\'', len = 1;
 	}
       str = buf;
     }

  reply	other threads:[~2015-05-13 14:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-10 23:55 bug#20545: New minor mode Electric Punct Paul Eggert
2015-05-11 15:00 ` Eli Zaretskii
2015-05-13  7:48   ` Paul Eggert
2015-05-13 13:10     ` Stefan Monnier
2015-05-13 14:49       ` Paul Eggert [this message]
2015-05-13 17:05         ` Eli Zaretskii
2015-05-14  3:52         ` Stefan Monnier
2015-05-14 14:54           ` Eli Zaretskii
2015-05-13 16:54       ` Eli Zaretskii
2015-05-13 16:38     ` Eli Zaretskii
2015-05-13 16:56       ` Paul Eggert
2015-05-13 17:16         ` Eli Zaretskii
2015-05-13 18:10           ` Eli Zaretskii
2015-05-14  6:32           ` Paul Eggert
2015-05-16 21:20             ` Paul Eggert
2015-05-17 14:33               ` Eli Zaretskii
2015-05-17 16:58                 ` Paul Eggert
2015-05-17 19:04                   ` Eli Zaretskii
2015-06-01  3:06                     ` bug#20545: Transliterating curved to straight quotes in 8-bit environments Paul Eggert
2015-06-01 14:31                       ` Eli Zaretskii
2015-05-11 15:57 ` bug#20545: New minor mode Electric Punct Stefan Monnier
2015-05-13  7:33   ` Paul Eggert
2015-05-11 16:48 ` Artur Malabarba
2015-05-26 11:24 ` bug#20545: New minor mode Electric Quote Paul Eggert
2015-05-27 14:24   ` Eli Zaretskii
2015-05-27 15:27     ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5553648B.60602@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=20545@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).