unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Cc: Lennart Borgman <lennart.borgman.073@student.lu.se>,
	Emacs-Devel <emacs-devel@gnu.org>
Subject: RE: info faces for strings and quotations
Date: Tue, 5 Oct 2004 09:11:02 -0700	[thread overview]
Message-ID: <FDELKNEBLPKKDCEBEJCBCEBECIAA.drew.adams@oracle.com> (raw)
In-Reply-To: <m1sm8t5r1g.fsf-monnier+emacs@gnu.org>

Thanks for lots of good input, Stephan. You made several good points about
the implementation, which I'll put into practice immediately.

As you know, in my first message, I used just these (separate) simple regexp
searches, which didn't take care of escaped "s but worked 99% of the time:

  (re-search-forward "`\\([^']+\\)'" nil t)
  (re-search-forward "\"\\([^\"]+\\)\"" nil t)

I mentioned the fact that the regexps could be improved, and Lennart was
kind enough to do some coding and testing. He came up with something that
solved the escaped "s pb, which I tried and sent along to the list (though I
mistakenly left off the non-greedy "?"). I sent the updated code because it
improved the functionality, taking care of some corner cases.

I'll make the implementation changes you suggest. Besides the implementation
issues, you asked this question about the _functionality_:

  Why fontify the interior of `...' but fontify both the interior and the
quotes for "..." ?   Is it just because your quoted face is bold and you
don't like to see the `
and ' in bold, or is there a deeper reason?

Good question. That was by design. In most Info files, `...' is used to
identify commands, key sequences, filenames and the like; "..." is used
(usually) to identify strings in code. I found that not highlighting the
single-quotes and highlighting the double-quotes improved readability. Try
different combinations of highlighting the quotes (or not), yourself, and
see what you think. My second choice would be to not highlight either kind
of delimiter.

BTW, I didn't test this with a terminal Emacs; I just threw the bold-italic
and italic face attributes in there at the last minute to have something for
the non-(class color) case. Do you have a suggestion on what to use in that
case? (In fact, just before I sent the email, the version I use had face
variables with defvar, which is why I used the names *-face -- a no-no
nowadays, as Miles pointed out.)

The code will be cleaner & leaner thanks to input from Lennart, Miles, and
you.
So, what do you and others think of the _desirability_ of (optionally)
highlighting quoted expressions in Info?

 - Drew

  reply	other threads:[~2004-10-05 16:11 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-03  7:05 info faces for strings and quotations Drew Adams
2004-10-05  7:15 ` Drew Adams
2004-10-05  7:30   ` Miles Bader
2004-10-06  8:34     ` Matt Hodges
2004-10-05  8:58   ` Drew Adams
2004-10-05 11:43     ` Stefan
2004-10-05 11:56   ` Stefan
2004-10-05 16:11     ` Drew Adams [this message]
2004-10-06  2:25       ` Luc Teirlinck
2004-10-06  4:19         ` Drew Adams
2004-10-06  4:28           ` Miles Bader
2004-10-06  7:40             ` Drew Adams
2004-10-06 21:32               ` Drew Adams
2004-10-06  4:53           ` Stefan Monnier
2004-10-06  7:07             ` Drew Adams
2004-10-06 17:07               ` Robert J. Chassell
2004-10-06 21:36                 ` Drew Adams
2004-10-07  5:53                 ` Juri Linkov
2004-10-07  6:53                   ` Drew Adams
2004-10-07 14:58                     ` Stefan Monnier
2004-10-07 15:13                       ` David Kastrup
2004-10-07 17:01                         ` Stefan Monnier
2004-10-08  5:13                           ` Drew Adams
2004-10-07 15:13                       ` Kim F. Storm
2004-10-07 16:35                         ` David Kastrup
2004-10-08  0:33                   ` Luc Teirlinck
2004-10-08 16:04                   ` Richard Stallman
2004-10-08 16:51                     ` Luc Teirlinck
2004-10-09 15:45                       ` Richard Stallman
2004-10-08 20:00                     ` Robert J. Chassell
2004-10-07  5:57               ` Juri Linkov
2004-10-07 15:22               ` w3 mode Camm Maguire
2004-10-07 17:03                 ` Stefan Monnier
2004-10-07 17:25                   ` Camm Maguire
2004-10-07 17:37                     ` Mark Plaksin
2004-10-07 17:45                     ` Kevin Rodgers
2004-10-08 16:05                 ` Richard Stallman
2004-10-08 17:44                   ` David Kastrup
2004-10-07 15:28               ` unexec development Camm Maguire
2004-10-15 14:10                 ` Camm Maguire
2004-10-15 14:35                   ` Jan D.
2004-10-15 21:11                     ` Camm Maguire
2004-10-16 13:52                   ` Richard Stallman
2004-10-06  8:44         ` info faces for strings and quotations Oliver Scholz
2004-10-07  5:55       ` Juri Linkov
2004-10-07  7:13         ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2004-10-05 16:15 LENNART BORGMAN
2004-10-05 16:28 ` Drew Adams

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=FDELKNEBLPKKDCEBEJCBCEBECIAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman.073@student.lu.se \
    /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).