Do setup Flymake in file-less Elisp buffers

Fixes: bug#40573

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Change
condition for setting flymake-diagnostic-functions.
This commit is contained in:
João Távora 2020-04-12 15:17:15 +01:00
parent 36873ef2b2
commit 01212a762f

View file

@ -264,9 +264,9 @@ Blank lines separate paragraphs. Semicolons start comments.
(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)))