emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: Colorizing source code in Info manuals


From: Drew Adams
Subject: RE: [External] : Re: Colorizing source code in Info manuals
Date: Wed, 11 Dec 2024 17:14:25 +0000

> > > I think some 'cheap' changes in info, such as the presentation of
> > > source code and emacs key sequences, in my unqualified opinion,
> > > are worth the effort at this point.
> >
> > Would you please say specifically what extensions you're suggesting?
> > How would one use them?  What jobs would they do?
> 
> I suggest modifying makinfo to generate markers around certain text in
> its Info output, so that we can find them (with lisp) and change text
> properties.
> 
> Those markers can be implemented using the construct that is used for
> images and indices, as Eli suggested.
> They are ignored by the standalone Info viewer when they are not
> recognized, so it will not be affected.

I'd welcome some such way to detect things in displayed
Info manuals.  A priori, it doesn't matter to me what's
used, (text properties, markers,...), as long as it works.

Picking up Lisp code examples is currently problematic.

I try doing that as an optional behavior in info+.el
(option `Info-fontify-indented-text-chars'), but because
indented contexts are different/various it's flaky.

Having code stand out, in a fixed-width font, is
especially useful if the main font for regular text is
variable-width.

> If you look at "A note for novices" on the Emacs lisp intro, which show
> many keys in the text, I think it its obvious that readability can be
> improved just by applying a different face to them.

FWIW, info+.el does that with no problem.  See attached.
(The "sunken" face is used for links to glossary terms,
so the word "region" in `indent-region' gets that face
instead of the face for code/keys.  Putting a face and
link on such glossary-term first occurrences is optional.)

Yes, fontifying such code/key occurrences uses hairy
regexps that look for different kinds of quotes and angle
brackets etc.  If Info included actual markup - whether
visible before final rendering or with text properties or
different kinds of markers, that would be preferable.

Attachment: throw-info+-key-highlighting.png
Description: throw-info+-key-highlighting.png


reply via email to

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