emacs-devel
[Top][All Lists]
Advanced

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

Re: Paragraph styles in doc strings


From: Stefan Monnier
Subject: Re: Paragraph styles in doc strings
Date: Wed, 01 Jun 2016 21:18:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> I'm not sure font-lock will work nicely for this. Blank lines are
> a multi-line pattern.

Actually, no, "^\n" is not a multi-line pattern (yes, it's right there
on the border, but it's on the right side of the fence).  And "^\n+"
should work as well (as long as we the behavior is the same as with
"^\n", tho slightly optimized), even though it *is*
a multi-line pattern.

> (with-current-buffer "*Help*"
>   (let ((inhibit-read-only t))
>     (save-excursion
>       (goto-char (point-min))
>       (while (re-search-forward help-blank-line-regexp nil t)
>         (font-lock-append-text-property
>          (match-beginning 0) (match-end 0)
>          'font-lock-face `(:height ,help-blank-line-height))))))

Oh, I'm not so concerned about the *Help* buffers, it's the source code
that annoys me (that's where I work and where I don't want to waste
screen real-estate).


        Stefan




reply via email to

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