emacs-devel
[Top][All Lists]
Advanced

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

Re: Colorizing source code in Info manuals


From: Cecilio Pardo
Subject: Re: Colorizing source code in Info manuals
Date: Wed, 11 Dec 2024 12:01:26 +0100
User-agent: Mozilla Thunderbird

On 11/12/2024 5:33, Richard Stallman wrote:

   > 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.

We would put them around some commands, like:

@kbd @key @code @example

For @code, @kbd and @key, Emacs Info reader keeps the standard font, and ads quotes around it, making them in my opinion even harder to read.

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.

This is the starting line from 1.1 Lisp lists, on the Lisp intro:

  In Lisp, a list looks like this: ‘'(rose violet daisy buttercup)’.

Would much easier without the quotes, and with a different face.

And for the @example command, we can colorize the code according to the language. Also add some tricks like a button to copy the example.











reply via email to

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