[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 6b88f78 2/2: Don't error when turning on Flymake
From: |
Jo�o T�vora |
Subject: |
[Emacs-diffs] emacs-26 6b88f78 2/2: Don't error when turning on Flymake with no known backends |
Date: |
Thu, 5 Oct 2017 19:09:23 -0400 (EDT) |
branch: emacs-26
commit 6b88f78aa1bcda78793f0254a34a9cc099e7ba72
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Don't error when turning on Flymake with no known backends
Leave it to the mode line indicator to inform the user that there
is still some configuration to do.
* lisp/progmodes/flymake.el (flymake-mode): Simplify.
---
lisp/progmodes/flymake.el | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index f61face..ebd5a1e 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -708,18 +708,14 @@ Interactively, with a prefix arg, FORCE is t."
(cond
;; Turning the mode ON.
(flymake-mode
- (cond
- ((not flymake-diagnostic-functions)
- (flymake-error "No backends to check buffer %s" (buffer-name)))
- (t
- (add-hook 'after-change-functions 'flymake-after-change-function nil t)
- (add-hook 'after-save-hook 'flymake-after-save-hook nil t)
- (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
-
- (setq flymake--backend-state (make-hash-table))
-
- (when flymake-start-syntax-check-on-find-file
- (flymake-start)))))
+ (add-hook 'after-change-functions 'flymake-after-change-function nil t)
+ (add-hook 'after-save-hook 'flymake-after-save-hook nil t)
+ (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
+
+ (setq flymake--backend-state (make-hash-table))
+
+ (when flymake-start-syntax-check-on-find-file
+ (flymake-start)))
;; Turning the mode OFF.
(t