unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: definition lines in Info - 1) link, 2) highlight
Date: Sat, 12 Aug 2006 10:33:23 -0700	[thread overview]
Message-ID: <EIENLHALHGIMHGDOLMIMEEHGCKAA.drew.adams@oracle.com> (raw)
In-Reply-To: <u64gydvtz.fsf@gnu.org>

    Sorry, I don't understand what to install.  Drew didn't show any code,
    nor explained in detail what the code should do and how.  The only
    thing I see is a regexp.  Is there already a variable that should be
    set to that regexp?  If so, please tell which variable is that.

I can point you to my code, but Richard might not like that. Here is an
abstract description:

The code searches an Info node for one-line descriptions (specs) of
functions, macros, variables etc., and fontifies these descriptions. An
example description is "Function: foo INTEGER1 &optional INTEGER2". The idea
is to make such lines stand out a bit, and to distinguish the different
types (function, command, etc.).

One way to do it:

1. Define a face for each of the description types: Function, Special Form,
etc. I have 7 such faces, so a reader can easily pick out, say, a Command or
Variable from a list of Functions.

2. Define a face for the rest of each description line, to be used for all
description types. That is, a description such as "Function: foo INTEGER1
&optional INTEGER2" will have one face applied to "Function:" and another
face applied to " foo INTEGER1 &optional INTEGER2". I use the same
background for all 8 faces.

3. Define a function that searches a node for the regexp and fontifies (via
put-text-property) accordingly, using the faces.

4. Call #3 in Info-fontify-node. For Emacs 22, I do that just before the
titles are fontified.

Let me know if you need more detail.

  reply	other threads:[~2006-08-12 17:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-11 15:16 definition lines in Info - 1) link, 2) highlight Drew Adams
2006-08-11 19:24 ` Richard Stallman
2006-08-12 11:42   ` Eli Zaretskii
2006-08-12 17:33     ` Drew Adams [this message]
2006-08-12 21:58       ` Eli Zaretskii
2006-08-13 13:53         ` Richard Stallman
2006-08-13 14:10           ` Drew Adams
2006-08-13 18:48           ` Eli Zaretskii
2006-08-15  2:42             ` Richard Stallman
2006-08-15 14:57               ` Drew Adams
2006-08-15 19:29                 ` Eli Zaretskii
2006-08-15 20:05                   ` Drew Adams
2006-08-15 21:01                 ` David Kastrup
2006-08-15 21:56                   ` Drew Adams
2006-08-15 22:49                     ` Chong Yidong
2006-08-15 23:24                       ` Drew Adams
2006-08-16  6:33                 ` Richard Stallman
2006-08-13 17:33   ` 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=EIENLHALHGIMHGDOLMIMEEHGCKAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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).