From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
Manuel Uberti <manuel.uberti@inventati.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: project--files-in-directory: code formatting
Date: Wed, 4 Nov 2020 21:40:28 +0200 [thread overview]
Message-ID: <6d07fe42-cc41-adfa-08ae-0c6111e9646d@yandex.ru> (raw)
In-Reply-To: <jwvd00tp56u.fsf-monnier+emacs@gnu.org>
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.")))
next prev parent reply other threads:[~2020-11-04 19:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 13:26 project--files-in-directory: code formatting Manuel Uberti
2020-11-04 14:30 ` Stefan Monnier
2020-11-04 14:45 ` Manuel Uberti
2020-11-04 15:44 ` Stefan Monnier
2020-11-07 10:47 ` Andrii Kolomoiets
2020-11-07 15:16 ` Stefan Monnier
2020-11-04 19:40 ` Dmitry Gutov [this message]
2020-11-04 21:20 ` Stefan Monnier
2020-11-05 2:25 ` Dmitry Gutov
2020-11-04 18:19 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d07fe42-cc41-adfa-08ae-0c6111e9646d@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=manuel.uberti@inventati.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).