From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#17021: 24.3.50; extension to hi-lock.el Date: Mon, 17 Aug 2020 03:32:08 +0300 Organization: LINKOV.NET Message-ID: <87d03q2juf.fsf@mail.linkov.net> 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="36913"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Lars Ingebrigtsen , 17021@debbugs.gnu.org, koppel@ece.lsu.edu, stefankangas@gmail.com To: hw Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 17 03:11:13 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 1k7Tg8-0009Ud-HH for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Aug 2020 03:11:12 +0200 Original-Received: from localhost ([::1]:37724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7Tg7-0007zQ-IJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Aug 2020 21:11:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7Tfz-0007wR-6D for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2020 21:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k7Tfy-0003jV-Tl for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2020 21:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k7Tfy-00085J-O4 for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2020 21:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Aug 2020 01:11: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.159762661430988 (code B ref 17021); Mon, 17 Aug 2020 01:11:02 +0000 Original-Received: (at 17021) by debbugs.gnu.org; 17 Aug 2020 01:10:14 +0000 Original-Received: from localhost ([127.0.0.1]:58725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7TfC-00083k-LH for submit@debbugs.gnu.org; Sun, 16 Aug 2020 21:10:14 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:50869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7TfA-00083U-Sq for 17021@debbugs.gnu.org; Sun, 16 Aug 2020 21:10:13 -0400 X-Originating-IP: 91.129.102.47 Original-Received: from mail.gandi.net (m91-129-102-47.cust.tele2.ee [91.129.102.47]) (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 273BB20005; Mon, 17 Aug 2020 01:10:02 +0000 (UTC) In-Reply-To: (hw@adminart.net's message of "Sun, 16 Aug 2020 19:49:38 +0200") 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:185355 Archived-At: > When you have a (source) file or a number of (source) files in a directory > (structure) highlighting patterns should be applied to, you probably want > to keep the pattern file(s) together with the source file(s) --- or at > least within the same directory structure. If you somehow distribute the > source files and/or have them under version control, you are facing the > problem of how to distribute the pattern files along with the source files > when you have a bunch of unrelated pattern files together with relevant > pattern files all in the same default location (i. e. some directory > somewhere else). And if you use the same pattern files for multiple > projects, you don't want the pattern files used by project A altered when > you revert to a previous commit of project B or when you merge changes to > project C just because all the pattern are at the same default location. All these problems were already solved long ago with the help of Directory Local Variables. Just put such lines to .dir-locals.el in the root of your project: ((emacs-lisp-mode . ((hi-lock-file-patterns . ((("^;;; .*" (0 (quote hi-black-hb) t))) (("make-variable-buffer-\\(local\\)" (0 font-lock-keyword-face)(1 'italic append))))))))