GNU bug report logs - #20545
New minor mode Electric Quote

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sun, 10 May 2015 23:57:02 UTC

Severity: wishlist

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 20545 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 20545 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Subject: Re: bug#20545: New minor mode Electric Punct
Date: Wed, 13 May 2015 19:54:30 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  20545 <at> debbugs.gnu.org
> Date: Wed, 13 May 2015 09:10:07 -0400
> 
> > I just now configured a terminal to refuse to display curved quotes, and
> > when I used it Emacs displayed "‘like this’" as "\u2018like this\u2019" with
> > underscores below the "\u2018" and the "\u2019".
> 
> Hmm... is it really Emacs that displayed it like this?  Or is it the
> terminal which did it?

Emacs.  That's how we display "glyphless" characters on a TTY.

> If it's Emacs, then I wonder how it figured it needed to do that,

By checking whether the character belongs to one of the charsets
supported by the terminal.  We call char_charset with the list of
charsets supported by the terminal frame; that charset list is set by
set-terminal-coding-system-internal.  See the end of
term.c:produce_glyphs.

> and if it's the terminal, then I wonder how Emacs could tell the
> terminal to...
> 
> > ... display it as "`like this'" with underscores under the "`" and the "'",
> > if you think that'd be a win.

We could discover this in advance (e.g., using char-displayable-p) and
use a display table, for example.




This bug report was last modified 9 years and 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.