From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Paragraph styles in doc strings Date: Wed, 01 Jun 2016 21:18:00 -0400 Message-ID: References: <878tzjjn3w.fsf@gnus.org> <9503e7e0-4402-554d-7533-9c3a6d2c5f77@yandex.ru> <87vb2jxbb9.fsf@gnus.org> <574F6944.800@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1464830333 30368 80.91.229.3 (2 Jun 2016 01:18:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jun 2016 01:18:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 02 03:18:45 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b8HHY-0000Ib-Kd for ged-emacs-devel@m.gmane.org; Thu, 02 Jun 2016 03:18:44 +0200 Original-Received: from localhost ([::1]:44755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8HHX-0001j6-OE for ged-emacs-devel@m.gmane.org; Wed, 01 Jun 2016 21:18:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8HH1-0001iZ-4q for emacs-devel@gnu.org; Wed, 01 Jun 2016 21:18:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8HGx-0003JU-37 for emacs-devel@gnu.org; Wed, 01 Jun 2016 21:18:11 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8HGw-0003IJ-SD for emacs-devel@gnu.org; Wed, 01 Jun 2016 21:18:07 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b8HGv-0008LT-8V for emacs-devel@gnu.org; Thu, 02 Jun 2016 03:18:05 +0200 Original-Received: from 45.72.173.47 ([45.72.173.47]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Jun 2016 03:18:05 +0200 Original-Received: from monnier by 45.72.173.47 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Jun 2016 03:18:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 45.72.173.47 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:ajoOhfPPyAqMWpb0FNzdEAmNIt0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204174 Archived-At: > 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