[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

definition lines in Info - 1) link, 2) highlight

From: Drew Adams
Subject: definition lines in Info - 1) link, 2) highlight
Date: Fri, 11 Aug 2006 08:16:43 -0700

1) This has perhaps been suggested before; I don't know.

How about having definition/reference lines such as the following be links
in the Elisp Info manual?

 - Variable: blink-paren-function
 - User Option: blink-matching-paren
 - Command: blink-matching-open

What would the link target be? Clicking such a link could 1) show you the
current value of a variable, a la pp-eval-expression, and 2) take you to the
defining source code. In many cases, the current value of a variable would
fit in the echo area; in other cases, two buffers would be displayed: the
source-code file and *Pp Eval Output*. For other than variables, only #2
would happen.

2) A related suggestion is this (which I think I might have made already):
highlight definition/reference lines in Info, so they stand out better. See
attached screenshot.

I do this in my own code, and I find that it helps readability. I use a
slightly different background color for the line, starting after the "- ",
and I use a different foregound color for each type name: Variable, User
Option, Command, Macro, Function, Special Form, and Syntax Class. In
particular, this helps you distinguish Variable and User Option visually;
likewise, Function and Command.

The regexp is trivial, and so far I've never seen a false or missed hit:
"^ --? \\(Function:\\|Variable:\\|Special Form:\\|\
Command:\\|User Option:\\|Macro:\\|Syntax class:\\)\\(.*\\)"

Attachment: info-reference-items.jpg
Description: JPEG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]