From: João Távora Date: Sun, 12 Apr 2020 14:17:15 +0000 (+0100) Subject: Do setup Flymake in file-less Elisp buffers X-Git-Tag: emacs-27.0.91~23 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=01212a762f;p=emacs.git 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. --- diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 2617a6e4cce..f39ecf9b7bc 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -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)))