From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Regarding adding additional default font-lock faces Date: Thu, 09 Aug 2018 09:57:47 -0400 Message-ID: References: <1533151464.4048871.1460317672.1FF86CD1@webmail.messagingengine.com> <1533193402.1422491.1460826912.040BAF55@webmail.messagingengine.com> <1533812663.2257232.1468575768.4605098F@webmail.messagingengine.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1533823041 22637 195.159.176.226 (9 Aug 2018 13:57:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 9 Aug 2018 13:57:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: jostein@kjonigsen.net, emacs-devel@gnu.org To: Jostein =?windows-1252?Q?Kj=F8nigsen?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 09 15:57:16 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fnlRA-0005fc-6K for ged-emacs-devel@m.gmane.org; Thu, 09 Aug 2018 15:57:12 +0200 Original-Received: from localhost ([::1]:50988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnlTG-0001n9-TG for ged-emacs-devel@m.gmane.org; Thu, 09 Aug 2018 09:59:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnlRs-0000zu-N1 for emacs-devel@gnu.org; Thu, 09 Aug 2018 09:57:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fnlRo-0001ox-Kh for emacs-devel@gnu.org; Thu, 09 Aug 2018 09:57:56 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:36492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnlRo-0001oj-D4 for emacs-devel@gnu.org; Thu, 09 Aug 2018 09:57:52 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w79DvmD6025505; Thu, 9 Aug 2018 09:57:49 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 0E0B7AE1F5; Thu, 9 Aug 2018 09:57:48 -0400 (EDT) In-Reply-To: <1533812663.2257232.1468575768.4605098F@webmail.messagingengine.com> ("Jostein =?windows-1252?Q?Kj=F8nigsen=22's?= message of "Thu, 09 Aug 2018 13:04:23 +0200") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6348=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6348> : inlines <6806> : streams <1795004> : uri <2686414> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:228329 Archived-At: > Do I just start hacking at lisp/font-lock.el and send in patches, or > should we discuss which faces would be useful to add first? Each face will need to be justified, but you can send a sample patch along with that justification. > * font-lock-function-call-face > * font-lock-decorator-face ("decorator" is another commonly used for > the "attribute" concept and less likely to be confused with for > instance HTML/XML attributes) > Are there any other nice-to-have default faces anyone can think of? If you can't think of others right now, then I recommend you stick to those two for now. Issues that come to mind: - For me a "function call" is made of both a function and some number of arguments. So it would be good to clarify to which part font-lock-function-call-face is meant to apply (the "function" part, I assume). Also, clarify how it would be used in the case of method calls (I guess, just highlight the method name). - Maybe the more difficult technical part will be to come up with a good default definition for those faces: just like for the other font-lock-*-faces, it should cover light and dark backgrounds, and it should maintain a good contrast. Finally, to justify their introduction, it would be useful to be able to point to existing Elisp packages which define/use their own faces for those uses. > Besides the actual LISP-code itself... What's the process for > documenting such changes? What other "house-keeping" needs to go with > such a code-change? The addition needs to be mentioned in etc/NEWS and grep font-lock-keyword-face **/*.texi will show you where they're documented (i.e. doc/lispref/modes.texi) Stefan