unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 24468@debbugs.gnu.org
Subject: bug#24468: Emacs 25.1: Use of face escape-glyph on curly quotes is irritating.
Date: Wed, 21 Sep 2016 15:04:09 +0000	[thread overview]
Message-ID: <20160921150409.GA1834@acm.fritz.box> (raw)
In-Reply-To: <83ponzhlxb.fsf@gnu.org>

Hello, Eli.

On Mon, Sep 19, 2016 at 07:52:16PM +0300, Eli Zaretskii wrote:
> > Date: Mon, 19 Sep 2016 10:01:01 +0000
> > From: Alan Mackenzie <acm@muc.de>
> > 
> > In Emacs 25.1, I am using the info files built for the distribution
> > using texinfo 5 (?or 6).  They contain lots of curly quotes.

> > On my Linux virtual terminal, these are all displayed with the
> > escape-glyph, which is irritating in the extreme.  The workaround of
> > customizing escape-glyph to the default face would prevent the effect of
> > highlighting things like \377 and ^L, which is the proper use of
> > escape-glyph.

> This is not supposed to happen.  Emacs should test at startup whether
> the terminal can display these characters, and if not, replace them by
> ASCII equivalents.  Please try to figure out why this doesn't work for
> you (it does for me, although not on a Linux terminal).

It _is_ "working" for me.  The function startup--setup-quote-display
determines that my Linux vt can't display the four curly quote
characters.  It's half right (it can display the curly single quotes but
not the curly double quotes).

It then goes on to set up these four characters in the standard display
table, and what it sets up is the equivalent ASCII characters with hard
coded face escape-glyph.  It's this last bit I don't like.  That bit of
the code looks like this:

    (dotimes (i 4)
      (let ((char (aref "`'""" i))
            (repl (aref repls i)))
        (if repl
            (aset (or standard-display-table
                      (setq standard-display-table (make-display-table)))
                  char (vector (make-glyph-code repl 'escape-glyph)))   <=============
          (when standard-display-table
            (aset standard-display-table char nil)))))


> > Please, can we have this facility, at long last, controlled by a
> > customisable option?

> Let's first understand why the automatic detection doesn't work.  IME,
> devising a solution for a problem we don't understand is not a good
> idea.

I think there's no mystery here.  Just my original post wasn't too clear.
I would like there to be a user option to decide whether to put the face
'escape-glyph on these four characters, rather than it being hard coded
at start-up time.  (I have now commented out "'escape-glyph" in my own
copy of Emacs.)

> Thanks.

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2016-09-21 15:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 10:01 bug#24468: Emacs 25.1: Use of face escape-glyph on curly quotes is irritating Alan Mackenzie
2016-09-19 16:52 ` Eli Zaretskii
2016-09-21 15:04   ` Alan Mackenzie [this message]
2016-09-21 16:00     ` Eli Zaretskii
2016-09-22 18:23 ` Paul Eggert
2016-09-22 18:42   ` Eli Zaretskii
2016-09-22 21:10     ` Juri Linkov
2016-09-22 21:15     ` Paul Eggert
2016-09-23  7:03       ` Eli Zaretskii
2016-10-17  5:52         ` 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=20160921150409.GA1834@acm.fritz.box \
    --to=acm@muc.de \
    --cc=24468@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).