From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Koppelman Newsgroups: gmane.emacs.bugs Subject: bug#17021: 24.3.50; extension to hi-lock.el Date: Thu, 13 Aug 2020 16:46:14 -0500 Message-ID: References: <87mwgp1mq4.fsf@yun.yagibdah.de> <877du2g7jj.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28705"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: lee , Lars Ingebrigtsen , 17021@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 13 23:47:22 2020 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 1k6L4E-0007Jj-CV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Aug 2020 23:47:22 +0200 Original-Received: from localhost ([::1]:38416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6L4C-0007CA-UR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Aug 2020 17:47:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6L3u-0007By-LY for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 17:47:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39765) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6L3u-0006wa-By for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 17:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k6L3u-00026D-8W for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 17:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Koppelman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Aug 2020 21:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17021 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo patch Original-Received: via spool by 17021-submit@debbugs.gnu.org id=B17021.15973551838020 (code B ref 17021); Thu, 13 Aug 2020 21:47:02 +0000 Original-Received: (at 17021) by debbugs.gnu.org; 13 Aug 2020 21:46:23 +0000 Original-Received: from localhost ([127.0.0.1]:51311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6L3H-00025I-HU for submit@debbugs.gnu.org; Thu, 13 Aug 2020 17:46:23 -0400 Original-Received: from relay.lsu.edu ([130.39.6.46]:50276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6L3F-000252-4s for 17021@debbugs.gnu.org; Thu, 13 Aug 2020 17:46:22 -0400 Original-Received: from cyc.ece.lsu.edu (cyc.ece.lsu.edu [96.125.115.182]) by relay.lsu.edu (Postfix) with ESMTPS id 74A472183A02; Thu, 13 Aug 2020 16:46:14 -0500 (CDT) In-Reply-To: (Stefan Kangas's message of "Thu, 13 Aug 2020 12:50:20 -0700") 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:185074 Archived-At: I've looked at the patch, but haven't tried to apply it to the current hi-lock. There are two things that need to be addressed before I would be happy with it landing. First, this patch should not include the code for highlighting global variables, function-like text, and constants. (Perhaps this code was included by accident.) Those situations are best handled by the font-lock modes for specific languages. Second, I don't feel comfortable reading a pattern file path from within the file being visited. Instead, some kind of identifier could be read from the file, such as xyz-report-patterns. That identifier would then be used to locate patterns from a file in some default location, such as ~/.emacs.d/hi-lock-patterns, or it could be used to construct a file name (but not a path) that would be expected in some directory, such as ~/.emacs.d/hi-lock-patterns/. David Koppelman