From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Paragraph styles in doc strings Date: Wed, 1 Jun 2016 19:01:24 -0400 Message-ID: <574F6944.800@gmail.com> References: <878tzjjn3w.fsf@gnus.org> <9503e7e0-4402-554d-7533-9c3a6d2c5f77@yandex.ru> <87vb2jxbb9.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hgfUXHkIcpRSmLJoaAMtToPm1Db0cfPlA" X-Trace: ger.gmane.org 1464822141 13493 80.91.229.3 (1 Jun 2016 23:02:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Jun 2016 23:02:21 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 02 01:02:12 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 1b8F9O-0005T8-JS for ged-emacs-devel@m.gmane.org; Thu, 02 Jun 2016 01:02:10 +0200 Original-Received: from localhost ([::1]:44470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8F9M-0000Ql-TJ for ged-emacs-devel@m.gmane.org; Wed, 01 Jun 2016 19:02:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8F8l-0000QT-2N for emacs-devel@gnu.org; Wed, 01 Jun 2016 19:01:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8F8h-0001xu-Tu for emacs-devel@gnu.org; Wed, 01 Jun 2016 19:01:31 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.130]:51987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8F8h-0001xn-Gi for emacs-devel@gnu.org; Wed, 01 Jun 2016 19:01:27 -0400 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0M0e3W-1bM3jP1uzm-00utR4 for ; Thu, 02 Jun 2016 01:01:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: X-Provags-ID: V03:K0:9/IzrWCh24/mE+lzN8cobODrKi3AN3S1WWjUZfmtwsreBxaOp0a 4vjFGeQZpUXsEpeJx4D0UhPnUtO2wX4kh11iwPBuBw8R0RunO2yqovdau4DnDNn5vPquwCA +NDhwLR0F/8/fqkWTCmOfQMfEJuvYc+QZGyfgM7/WoRt3SNfauzg7KC+pyk4V6Aqk1ppjxj ea4V4KZnQ8bhF18CEPULg== X-UI-Out-Filterresults: notjunk:1;V01:K0:zVdq27S46pk=:okEPgty9s5Iq4yfBhGKTlc rOp1/IVcqFbc7kBrzUZik1exMcoZgIS1CGRXRunv8CAlEt/t80f5iF0rVx5+yE/PZfPV8fV1f 9zKaDeGPwpdh7lQpv6pxumxuTbFhoU9PGhmSERb9InKZehlDStLpVcJ9CHqIzS2KCP1KfYwzC 7oTvjJSpQp/3z42ZH58H1VlU+zF5lDyG17oMky/HWywUm/7lGlI2FRIcWqWYX8nGwuZXPN39/ 0HGS8mEkMj/1ZnODOGT+HuMh9SFAZA/OodzajGtc2abGSDrTGlvw36VFvaihSNBNEuxGdiXQX T/6/w6HI39d/i1CLhsCwRxtI224oyagc1MSuY73107qxocyus5Gh05VtMKssQgpppuw+IC3PQ QjLSknMCaf2yqa+V1WRNeQBL4YRLGnTyaWwZXExM069+SC37Jvy/qQ15F8lX3I84CT8rWsIpc ixhinbpCnm3RK+ByycJxTr1Qe2wy58dWI2DCXJpP+f4GxbQ6Nz7o2lbxBOxdNEgtN+iKlysX3 5pLN0qungXW/oXuwRvPcdnzHPyEGEhEnZCbOfF3kUWPy72xVixqaBVxQrlpbG1FbjyBWamtWh sATiDG3QJx9OQytIz+Dy5gEryHMpUlSi46PNnkX+eWOR7ZFW9Cgu7ofahROEpF4EoKrOHPoby 6lTuOZMkuBfkqeepEbSKxs3l7Eqt10NfQKCSLx2/ROcLbBy7A7I/BR+TM8nffcczBb/Q= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 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:204173 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hgfUXHkIcpRSmLJoaAMtToPm1Db0cfPlA Content-Type: multipart/mixed; boundary="dIrOK1dcWQCesaqT2xt81adOcxrResJNE" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: emacs-devel@gnu.org Message-ID: <574F6944.800@gmail.com> Subject: Re: Paragraph styles in doc strings References: <878tzjjn3w.fsf@gnus.org> <9503e7e0-4402-554d-7533-9c3a6d2c5f77@yandex.ru> <87vb2jxbb9.fsf@gnus.org> In-Reply-To: --dIrOK1dcWQCesaqT2xt81adOcxrResJNE Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016-05-16 16:53, Stefan Monnier wrote: > If we ever want to refill docstrings automatically (ideally when > displaying them), then we'll need some stronger hint than a newline. > So I guess an empty line is not a bad idea, but I would indeed welcome > some font-lock hack that make those empty lines shorter. I'm not sure font-lock will work nicely for this. Blank lines are a multi= -line pattern. On the other hand, this seems to work OK: (defvar help-blank-line-height 0.5) (defvar help-blank-line-regexp "\n\n+") (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)))))) Of course, you could use that loop instead to add a font-lock-multiline p= roperty to the newlines, and then use this: (with-current-buffer "*Help*" (font-lock-add-keywords nil '(("\n\n+" 0 `(face (:height 0.5)))))) But that sounds like more code for no added benefit. The simplest solutio= n is probably to change the function that inserts the docstring to insert= a string with the right properties applied. Cl=E9ment. --dIrOK1dcWQCesaqT2xt81adOcxrResJNE-- --hgfUXHkIcpRSmLJoaAMtToPm1Db0cfPlA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXT2lEAAoJEPqg+cTm90wjS8wP/jAnEeQsD+JnYyns6mtZ1NCE m6Qjc8Iai9vtWaHcu3KuG0ov3ORrtOMHfIFaiqC7pLmShDybzVmhH17t7p3rnVp6 4vVwJbbgS3JWsUcesj+DRV7GR5DwAGIqeh7kzZ9+9dhS3gY1I5vbyxg+PPbsJ7zG vMIx9tXXqvJFlJQmmYQNbR2q69cnJ0bMWfGlQ4mOSN1DRNQvcDS/FZWXWqbBEtrF WUcRDkKK6I89j3xYpAYHdgkclfdGTUcaMMUVZLLczp/mqWwqUJPgJicr+oze4SVH PrXeGJj4772vCBg36/RMT9Cj0fzFBB0iX+5HEDP9Lo7NCRcc1Y1reK7+uUXVKd9i o66yQ9RP7ZnLyq56uiyaFd+aLGGCwSqu4/XGPJdfdIyghu/ZS6UVTffHUG5Q5cug jzRqoMRUyoTFvPowl7VLCcFO2CpbEmAbR7J8hu2btoed2GE/AIozypWADUlXE8bh 7oz2oEj9wFs6lycJMv0fiv91cxFYQ8RqU6jvV9fq+pp8qXnDc6TtcmKFXAYH7F7W Yi0wyz9+KeNreqzZqCsRetBmtLqMcElkRwUChzd8SJJyJ3vlzrslm4BEcdFPZ6F1 DukIZ7m8sjpReN2F/pqbL6wjyDv0Jbj8b7W68QOLwf8Tfw49obvtKa/57GfmfvcO ZP80GJtUJk6WQ0FvxInH =dHi7 -----END PGP SIGNATURE----- --hgfUXHkIcpRSmLJoaAMtToPm1Db0cfPlA--