]> git.eshelyaron.com Git - emacs.git/commitdiff
Do setup Flymake in file-less Elisp buffers
authorJoão Távora <joaotavora@gmail.com>
Sun, 12 Apr 2020 14:17:15 +0000 (15:17 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sun, 12 Apr 2020 14:17:15 +0000 (15:17 +0100)
Fixes: bug#40573
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Change
condition for setting flymake-diagnostic-functions.

lisp/progmodes/elisp-mode.el

index 2617a6e4cce3cec0a4ab0f53ce7406ce006dc949..f39ecf9b7bc1c5f6fca086271279d7ee5fd742f9 100644 (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)))