From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: project--files-in-directory: code formatting Date: Wed, 4 Nov 2020 21:40:28 +0200 Message-ID: <6d07fe42-cc41-adfa-08ae-0c6111e9646d@yandex.ru> References: <0751c421-d860-2d79-74ee-52806d46fc13@inventati.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3453"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: emacs-devel To: Stefan Monnier , Manuel Uberti Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 04 20:41:29 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kaOev-0000no-Fj for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Nov 2020 20:41:29 +0100 Original-Received: from localhost ([::1]:43070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaOeu-0006hy-Hu for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Nov 2020 14:41:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaOe3-00066Q-Rm for emacs-devel@gnu.org; Wed, 04 Nov 2020 14:40:35 -0500 Original-Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:44792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kaOe1-0000zZ-TF for emacs-devel@gnu.org; Wed, 04 Nov 2020 14:40:35 -0500 Original-Received: by mail-ed1-x52c.google.com with SMTP id w1so22584946edv.11 for ; Wed, 04 Nov 2020 11:40:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hi1QWXiHX33f22aNBhG7yEmEtLyECijBsmsay9ogCCQ=; b=qXzAnGQp5Vtz+JBC/b+DpywPI5YKUgPr1nhVflOJh9aRWNWShgtxiFKqhFTfyLq0w6 xre8Sk/jNybvxita+f1/7aSoGE3N+MmYvNCxvuDf14x5fmgBvf45909FqxbstTOu15+6 9rW4uceUv8rtlmAkW7GU2T4bi2fpAcH4U+DQdsLbyNh2RkyuRC5Fj0K6U/DMga5DIO9L r2XOsvkZzXxc1GOa9F7gYqaV6i9XJUYiAEbrpeNSEsx/ASS246CsE4ERtJVPGKaJUKeM eNgnz8PqosvScQnlaVat3iuQz5YdopqbCh8tmWw2fNSD5MCoZh3AtpB4gIMUvlzlLPQk uXEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hi1QWXiHX33f22aNBhG7yEmEtLyECijBsmsay9ogCCQ=; b=szc0DNnL/Jb/SYqRDcP5Q1rtuFpy23L62DdtERVDtDlfKtY587zCTGdy5afJYQpidL JHs2dxbVVXRtejTAQMWeGI3Nr1nKD3CKHBt/zWd46CC0NhdjEXf+fsBRS1sQtBkD6RYe nBvbYKS2RC2+wg4LAQr8xYyv9n7WIv5+DUqIWzUd6fFOqYfkAx1ihjUNxmiDqdp3mgHO g23OMr3E0USFoyPHoDcvsDXqcfI9Y5YVBHSdtNSwf/bIFgklnHeetun1+SEHX3OvS6+i DAqnViPpyJZ3+6wmWwjlkhwYkldqbI7/qMa7VEXyLD87CLOho4AIt/d3/ujE/j1Zzp7F dtnQ== X-Gm-Message-State: AOAM530v6bqDUXlh9uqtLA108EB1CH7LXh11O1lwT+4/XQ3QZcZrvmWV +qMpHG2IPeHY5PuVBahXxGUWwPeC+gXODg== X-Google-Smtp-Source: ABdhPJyxnygcATewnDUs+dDYT6RDhB2QBMh4VSu91poRyDuHU65oD6hkw++1w/Fe8wZ6TfjHJZ/+Fg== X-Received: by 2002:a05:6402:16d5:: with SMTP id r21mr18821579edx.358.1604518831687; Wed, 04 Nov 2020 11:40:31 -0800 (PST) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id v21sm1510170edt.80.2020.11.04.11.40.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Nov 2020 11:40:30 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=raaahh@gmail.com; helo=mail-ed1-x52c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258699 Archived-At: On 04.11.2020 16:30, Stefan Monnier wrote: > (if you replace > the empty string with a symbol, it does catch it, tho) I tried it with a symbol. Yet, the red failed to show up with my config. Looking at the text properties, 'help-echo' was there, but not the 'face' property. Apparently that is because of this personal setup I have for dimming parens: (defface esk-paren-face '((((class color) (background light)) (:foreground "grey55"))) "Face for parens.") (dolist (mode '(scheme emacs-lisp lisp lisp-interaction clojure clojurescript inferior-emacs-lisp nrepl)) (when (> (display-color-cells) 8) (font-lock-add-keywords (intern (format "%s-mode" mode)) '(("(\\|)" . 'esk-paren-face)))) (add-hook (intern (format "%s-mode-hook" mode)) 'paredit-mode)) One way to avoid the conflict would be to avoid matching parens in lisp--match-hidden-arg, but that seems very ad-hoc. How about this? Fixes the string literal case as well. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 352210f859..d4411f1fa4 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -477,8 +477,9 @@ lisp--match-confusable-symbol-character (1 'font-lock-regexp-grouping-backslash prepend) (3 'font-lock-regexp-grouping-construct prepend)) (lisp--match-hidden-arg - (0 '(face font-lock-warning-face - help-echo "Hidden behind deeper element; move to another line?"))) + (0 '( face font-lock-warning-face + help-echo "Hidden behind deeper element; move to another line?") + t)) (lisp--match-confusable-symbol-character 0 '(face font-lock-warning-face help-echo "Confusable character")) @@ -521,8 +522,9 @@ lisp--match-confusable-symbol-character (,(concat "(\\(\\(do-\\|with-\\)" lisp-mode-symbol-regexp "\\)") (1 font-lock-keyword-face)) (lisp--match-hidden-arg - (0 '(face font-lock-warning-face - help-echo "Hidden behind deeper element; move to another line?"))) + (0 '( face font-lock-warning-face + help-echo "Hidden behind deeper element; move to another line?") + t)) )) "Gaudy level highlighting for Lisp modes.")))