help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to add syntax-highlighting to a Help buffer?


From: Emanuel Berg
Subject: Re: How to add syntax-highlighting to a Help buffer?
Date: Sun, 05 Jul 2015 01:24:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

>> One question is, why doesn't help-mode do this the
>> customary way?
>
> `font-lock-mode' is not so useful for the
> fontification of Help buffers, so it makes sense not
> to use it. For highlighting regexps, as in your
> examples, hi-lock is just fine.

I am unfamiliar with hi-lock.

> *Help* is mostly text, not code.

Yeah, but there are recurring patterns, for example
those that I just fontified: interactive, compiled,
Lisp (sometimes "C"), function, etc. Here,
highlighting could be used just as anywhere to reduce
reading and increase seeing. Hand on the heart, when
you bring up the help, do you actually *read*

    ... is an interactive compiled Lisp function ...
    
I sure don't, so for me it is a small window of
improvement to have that colorized because then it
would enter my mind that way instead (more), and
I would still not read it.

For example, having "Lisp" in one color and "C" in
another would be cool.

> OTOH the code could be easily rewritten to use
> font-lock-mode and propertize via the font-lock-face
> text property. I guess the reason for that this is
> not the case is just that *Help* is much older than
> font-lock-face, and nobody yet
> wanted/needed/requested to use font-lock-mode in
> *Help*.

Yeah, that sound reasonable.

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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