From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#50041: Add font-lock-doc-markup-face Date: Fri, 13 Aug 2021 12:53:04 +0200 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_5B279EAD-8007-4E5C-9327-AEE0D6C12AD6" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39720"; mail-complaints-to="usenet@ciao.gmane.io" To: 50041@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 13 12:54:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEUpG-000A6T-4e for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Aug 2021 12:54:10 +0200 Original-Received: from localhost ([::1]:59986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEUpE-0008MS-9P for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Aug 2021 06:54:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEUp8-0008MJ-9H for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 06:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEUp7-0004w3-UG for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 06:54:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mEUp7-0001Im-Ns for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 06:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Aug 2021 10:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50041 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16288519984950 (code B ref -1); Fri, 13 Aug 2021 10:54:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Aug 2021 10:53:18 +0000 Original-Received: from localhost ([127.0.0.1]:40561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEUoQ-0001Hm-Hc for submit@debbugs.gnu.org; Fri, 13 Aug 2021 06:53:18 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEUoM-0001Hb-VS for submit@debbugs.gnu.org; Fri, 13 Aug 2021 06:53:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEUoM-0008Km-MW for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 06:53:14 -0400 Original-Received: from mail1434c50.megamailservers.eu ([91.136.14.34]:59514 helo=mail263c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEUoI-0004Cl-Qz for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 06:53:14 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1628851986; bh=DBMzd2IYZCcykUI+lwKz+riDeLHSlgDhR8HGWDMLDOA=; h=From:Subject:Date:To:From; b=XAy5Xgvw4kEVqo9Y7G+jLI+BXW1iKbNmvsLMRHtbVURqzn399NrlPFyjeyDwuKCNM 486XcDqkG14toot9i95Ql8tqHScPw9bAWSXAwnGvDjdA3lbAOzBEg9GNZKaBO9ku+F y6fDEoxFNrlNDwgSOfQC4TfEtG4yc9D+jlsLUwc0= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17DAr4d0020036 for ; Fri, 13 Aug 2021 10:53:06 +0000 X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1C.61164F12.0037, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=St3uF8G0 c=1 sm=1 tr=0 a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=M51BFTxLslgA:10 a=3vtEJ0S4cZPj5zxcCqQA:9 a=CjuIK1q_8ugA:10 a=b3X37vTZZnmG3GshoWUA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=B2y7HmGcmWMA:10 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.14.34; envelope-from=mattiase@acm.org; helo=mail263c50.megamailservers.eu X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211727 Archived-At: --Apple-Mail=_5B279EAD-8007-4E5C-9327-AEE0D6C12AD6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Add a standard face for mark-up syntax and keywords inside code = documentation (doc comments/strings) whose body text is typically set in = font-lock-doc-face. This could include various tags, brackets, quotes, = keywords or other syntactically special characters. Justification: - A standard face means that users and theme authors can set it once for = all modes needing it. - Having a face that harmonises with font-lock-doc-face reduces the risk = of bad ergonomics and aesthetics. - Setting doc mark-up in a distinct face makes in-source documentation = more readable. - It also aids writing documentation by providing feed-back to the = programmer in the same way as fontifying regular language constructs. The CC modes have the foresight of already using = `font-lock-doc-markup-face` if defined, anticipating its eventual = addition, defaulting to `font-lock-constant-face`. I therefore propose = that the new face will inherit from `font-lock-constant-face` by = default. Proposed patch attached. --Apple-Mail=_5B279EAD-8007-4E5C-9327-AEE0D6C12AD6 Content-Disposition: attachment; filename=0001-Add-font-lock-doc-markup-face.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Add-font-lock-doc-markup-face.patch" Content-Transfer-Encoding: quoted-printable =46rom=206265617a428a60db9ca932a2bff33c70a94a9bc0=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2013=20Aug=202021=2012:47:39=20+0200=0A= Subject:=20[PATCH]=20Add=20font-lock-doc-markup-face=0A=0AThis=20face=20= is=20intended=20for=20mark-up=20syntax=20and=20constructs=20inside=20= text=0Ausing=20font-lock-doc-face;=20ie,=20documentation=20comments=20= and=20strings.=0A=0A*=20lisp/font-lock.el=20(font-lock-doc-markup-face):=20= New=20face=20and=20variable.=0A*=20lisp/cus-theme.el=20= (custom-theme--listed-faces):=20Add=20it=20to=20the=20list.=0A*=20= doc/lispref/modes.texi=20(Faces=20for=20Font=20Lock):=20Document=20it.=0A= *=20etc/NEWS:=20Mention=20it.=0A---=0A=20doc/lispref/modes.texi=20|=205=20= +++++=0A=20etc/NEWS=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=207=20= +++++++=0A=20lisp/cus-theme.el=20=20=20=20=20=20|=202=20+-=0A=20= lisp/font-lock.el=20=20=20=20=20=20|=208=20++++++++=0A=204=20files=20= changed,=2021=20insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/doc/lispref/modes.texi=20b/doc/lispref/modes.texi=0Aindex=20= d48c9cc1af..7a651b6390=20100644=0A---=20a/doc/lispref/modes.texi=0A+++=20= b/doc/lispref/modes.texi=0A@@=20-3447,6=20+3447,11=20@@=20Faces=20for=20= Font=20Lock=0A=20for=20documentation=20strings=20in=20the=20code.=20=20= This=20inherits,=20by=20default,=20from=0A=20= @code{font-lock-string-face}.=0A=20=0A+@item=20font-lock-doc-markup-face=0A= +@vindex=20font-lock-doc-markup-face=0A+for=20mark-up=20constructs=20in=20= text=20using=20@code{font-lock-doc-face}.=0A+This=20inherits,=20by=20= default,=20from=20@code{font-lock-constant-face}.=0A+=0A=20@item=20= font-lock-negation-char-face=0A=20@vindex=20font-lock-negation-char-face=0A= =20for=20easily-overlooked=20negation=20characters.=0Adiff=20--git=20= a/etc/NEWS=20b/etc/NEWS=0Aindex=2026ede71523..6fce7c6a43=20100644=0A---=20= a/etc/NEWS=0A+++=20b/etc/NEWS=0A@@=20-149,6=20+149,13=20@@=20invoked=20= with=20the=20'--declarations'=20command-line=20option.=0A=20**=20New=20= command=20'font-lock-update',=20bound=20to=20'C-x=20x=20f'.=0A=20This=20= command=20updates=20the=20syntax=20highlighting=20in=20this=20buffer.=0A=20= =0A++++=0A+**=20A=20new=20standard=20face=20'font-lock-doc-markup-face'.=0A= +Intended=20for=20documentation=20mark-up=20syntax=20and=20tags=20inside=20= text=20that=0A+uses=20'font-lock-doc-face'.=20=20This=20would=20= typically=20be=20used=20in=0A+documentation=20comments=20for=20systems=20= such=20as=20Doxygen,=20Haddock,=20Javadoc=20etc.=0A+By=20default=20this=20= face=20inherits=20from=20'font-lock-constant-face'.=0A+=0A=20**=20The=20= new=20NonGNU=20ELPA=20archive=20is=20enabled=20by=20default=20alongside=20= GNU=20ELPA.=0A=20=0A=20+++=0Adiff=20--git=20a/lisp/cus-theme.el=20= b/lisp/cus-theme.el=0Aindex=20f4885d0f52..7457d9e323=20100644=0A---=20= a/lisp/cus-theme.el=0A+++=20b/lisp/cus-theme.el=0A@@=20-66,7=20+66,7=20= @@=20custom-theme--listed-faces=0A=20=20=20shadow=20secondary-selection=20= trailing-whitespace=0A=20=20=20font-lock-builtin-face=20= font-lock-comment-delimiter-face=0A=20=20=20font-lock-comment-face=20= font-lock-constant-face=0A-=20=20font-lock-doc-face=20= font-lock-function-name-face=0A+=20=20font-lock-doc-face=20= font-lock-doc-markup-face=20font-lock-function-name-face=0A=20=20=20= font-lock-keyword-face=20font-lock-negation-char-face=0A=20=20=20= font-lock-preprocessor-face=20font-lock-regexp-grouping-backslash=0A=20=20= =20font-lock-regexp-grouping-construct=20font-lock-string-face=0Adiff=20= --git=20a/lisp/font-lock.el=20b/lisp/font-lock.el=0Aindex=20= 4dc42d9cf6..32b7819533=20100644=0A---=20a/lisp/font-lock.el=0A+++=20= b/lisp/font-lock.el=0A@@=20-312,6=20+312,9=20@@=20font-lock-string-face=0A= =20(defvar=20font-lock-doc-face=09=09'font-lock-doc-face=0A=20=20=20= "Face=20name=20to=20use=20for=20documentation.")=0A=20=0A+(defvar=20= font-lock-doc-markup-face=20=20=20=20=20=20=20'font-lock-doc-markup-face=0A= +=20=20"Face=20name=20to=20use=20for=20documentation=20mark-up.")=0A+=0A=20= (defvar=20font-lock-keyword-face=09=09'font-lock-keyword-face=0A=20=20=20= "Face=20name=20to=20use=20for=20keywords.")=0A=20=0A@@=20-2006,6=20= +2009,11=20@@=20font-lock-doc-face=0A=20=20=20"Font=20Lock=20mode=20face=20= used=20to=20highlight=20documentation."=0A=20=20=20:group=20= 'font-lock-faces)=0A=20=0A+(defface=20font-lock-doc-markup-face=0A+=20=20= '((t=20:inherit=20font-lock-constant-face))=0A+=20=20"Font=20Lock=20mode=20= face=20used=20to=20highlight=20documentation=20mark-up."=0A+=20=20:group=20= 'font-lock-faces)=0A+=0A=20(defface=20font-lock-keyword-face=0A=20=20=20= '((((class=20grayscale)=20(background=20light))=20:foreground=20= "LightGray"=20:weight=20bold)=0A=20=20=20=20=20(((class=20grayscale)=20= (background=20dark))=20=20:foreground=20"DimGray"=20:weight=20bold)=0A--=20= =0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_5B279EAD-8007-4E5C-9327-AEE0D6C12AD6--