Subject: Re: bug#20545: New minor mode Electric Punct

From: Eli Zaretskii <[email-masked]>
Date: Wed, 13 May 2015 20:05:28 +0300

> Date: Wed, 13 May 2015 07:49:47 -0700
> From: Paul Eggert <[email-masked]>
> CC: Eli Zaretskii <[email-masked]>, [email-masked]
> 
> 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.
> 
> 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;

I think we should use a display table here, like we do with other
special characters.  Hard-coding the replacements sounds un-Emacsy.

Thanks.