diff options
author | João Távora <joaotavora@gmail.com> | 2018-06-08 19:35:31 +0100 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2018-06-08 19:35:48 +0100 |
commit | 21c6534ef31c7e6439884a0df8523e28e4b12040 (patch) | |
tree | ff2d73339230da38d24d3e37794bb064673ce8c6 /lisp/progmodes/flymake.el | |
parent | fe06f643b2808b198bb58bda04a8c863e55a2a56 (diff) | |
download | emacs-21c6534ef31c7e6439884a0df8523e28e4b12040.tar.gz emacs-21c6534ef31c7e6439884a0df8523e28e4b12040.tar.bz2 emacs-21c6534ef31c7e6439884a0df8523e28e4b12040.zip |
New flymake-start-on-save-buffer custom variable
Fixes: bug#21419
* lisp/progmodes/flymake.el (flymake-after-save-hook): Use
flymake-start-on-save-buffer.
(flymake-start-on-save-buffer): New custom variable.
(flymake-start-on-flymake-mode): Tweak docstring.
Diffstat (limited to 'lisp/progmodes/flymake.el')
-rw-r--r-- | lisp/progmodes/flymake.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index d8959c8356a..fdb22ccaf34 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -196,11 +196,17 @@ If nil, never start checking buffer automatically like this." 'flymake-start-on-flymake-mode "26.1") (defcustom flymake-start-on-flymake-mode t - "Start syntax check when `flymake-mode' is enabled. + "If non-nil, start syntax check when `flymake-mode' is enabled. Specifically, start it when the buffer is actually displayed." :version "26.1" :type 'boolean) +(defcustom flymake-start-on-save-buffer t + "If non-nil start syntax check when a buffer is saved. +Specifically, start it when the saved buffer is actually displayed." + :version "27.1" + :type 'boolean) + (defcustom flymake-log-level -1 "Obsolete and ignored variable." :type 'integer) @@ -962,7 +968,7 @@ Do it only if `flymake-no-changes-timeout' is non-nil." (flymake--schedule-timer-maybe))) (defun flymake-after-save-hook () - (when flymake-mode + (when flymake-start-on-save-buffer (flymake-log :debug "starting syntax check as buffer was saved") (flymake-start t))) |