GNU bug report logs -
#40573
27.0.90; flymake-mode broken in scratch buffer
Previous Next
Reported by: João Távora <joaotavora <at> gmail.com>
Date: Sun, 12 Apr 2020 13:20:02 UTC
Severity: normal
Found in version 27.0.90
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#40573: 27.0.90; flymake-mode broken in scratch buffer
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 40573 <at> debbugs.gnu.org.
--
40573: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40573
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
On Mon, Apr 20, 2020 at 5:05 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: João Távora <joaotavora <at> gmail.com>
> > Date: Mon, 20 Apr 2020 15:02:47 +0100
> > Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
> > Juri Linkov <juri <at> linkov.net>, 40573 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
> >
> > Shall I squash the commits and push to master?
>
> If there's nothing left to take care of, sure.
Done. Also marking this bug "done".
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Hi,
Eli, remember when you added this commit?
commit 61fb5214816ef3d57e676d900e499ffcd079a1f9
Author: Eli Zaretskii <eliz <at> gnu.org>
Date: Mon Oct 21 14:29:13 2019 +0300
Avoid false indications from Flymake in .dir-locals.el files
This seems to have the unintended effect of also disabling flymake-mode
in fileless elisp buffers, like *scratch*. Was it intended? It seems like
a
regression in relation to 26.3. The repro is simple:
Emacs -Q
M-x flymake-mode
Works in Emacs 26.3, doesn't in Emacs-27.
Again, without wanting to rehash a long and difficult discussion, I
think the best way to fix the original problem is to make an
emacs-lisp-data-mode and use that mode for .dir-locals.el.
emacs-lisp-data-mode ; things related to
^ ; emacs-lisp-data, like sexp navigation,
| ; comments, etc. Use for .dir-locals.el
|
|
emacs-lisp-mode ; things related to data which happens
^ ; to also be code. Setup xref, flymake, imenu,
| ; etc
|
|
lisp-interaction-mode ; no change, basically this just has an
; enhanced keymap for for the advanced
; interaction possibilities.
That said, whatever fix we can come up with for this regression is
probably safer for Emacs 27. I propose this slight convolution of the
condition you added.
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 2617a6e4cc..f39ecf9b7b 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -264,9 +264,9 @@ emacs-lisp-mode
(unless
(let* ((bfname (buffer-file-name))
(fname (and (stringp bfname) (file-name-nondirectory
bfname))))
- (or (not (stringp fname))
- (string-match "\\`\\.#" fname)
- (string-equal dir-locals-file fname)))
+ (and (stringp fname)
+ (or (string-match "\\`\\.#" fname)
+ (string-equal dir-locals-file fname))))
(add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t)
(add-hook 'flymake-diagnostic-functions
#'elisp-flymake-byte-compile nil t)))
[Message part 5 (text/html, inline)]
This bug report was last modified 5 years and 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.