the buffer is saved, unless @code{flymake-start-on-save-buffer} is
nil;
-@item
-a newline character is added to the buffer, unless
-@code{flymake-start-on-newline} is nil;
-
@item
some changes were made to the buffer more than @code{0.5} seconds ago
(the delay is configurable in @code{flymake-no-changes-timeout}).
started after this many seconds, unless the user makes another change,
which resets the timer.
-@item flymake-start-on-newline
-A boolean flag indicating whether to start syntax check immediately
-after a newline character is inserted into the buffer.
-
@item flymake-start-on-flymake-mode
A boolean flag indicating whether to start syntax check immediately
after enabling @code{flymake-mode}.
a message about the error locus.
---
-** New variable 'grep-search-path defines' the directories searched for
+** New variable 'grep-search-path' defines the directories searched for
grep hits (this used to be controlled by 'compilation-search-path').
---
'flymake-diagnostic-functions' or the Flymake manual for details.
+++
-*** The variable 'flymake-start-syntax-check-on-newline' is obsolete
-and renamed to 'flymake-start-on-newline'.
+*** 'flymake-start-syntax-check-on-newline' is now obsolete,
+use 'post-self-insert-hook' to check on newline.
** Ruby
;; The main interactive entry point is the `flymake-mode' minor mode,
;; which periodically and automatically initiates checks as the user
;; is editing the buffer. The variables `flymake-no-changes-timeout',
-;; `flymake-start-on-newline' and `flymake-start-on-flymake-mode'
-;; give finer control over the events triggering a check, as does the
-;; interactive command `flymake-start', which immediately starts a check.
+;; `flymake-start-on-flymake-mode' give finer control over the events
+;; triggering a check, as does the interactive command `flymake-start',
+;; which immediately starts a check.
;;
;; Shortly after each check, a summary of collected diagnostics should
;; appear in the mode-line. If it doesn't, there might not be a
(const right-fringe)
(const :tag "No fringe indicators" nil)))
-(define-obsolete-variable-alias 'flymake-start-syntax-check-on-newline
- 'flymake-start-on-newline "27.1")
-
-(defcustom flymake-start-on-newline t
- "Start syntax check if newline char was added/removed from the buffer."
- :type 'boolean)
+(make-obsolete-variable 'flymake-start-syntax-check-on-newline
+ "can check on newline in post-self-insert-hook"
+ "27.1")
(defcustom flymake-no-changes-timeout 0.5
"Time to wait after last change before automatically checking buffer.
-If nil, never start checking buffer automatically like this.
-You may also want to disable `flymake-start-on-newline'."
+If nil, never start checking buffer automatically like this."
:type '(choice (number :tag "Timeout in seconds")
(const :tag "No check on timeout" nil)))
Flymake performs these checks while the user is editing.
The customization variables `flymake-start-on-flymake-mode',
-`flymake-no-changes-timeout' and `flymake-start-on-newline'
-determine the exact circumstances whereupon Flymake decides
-to initiate a check of the buffer.
+`flymake-no-changes-timeout' determine the exact circumstances
+whereupon Flymake decides to initiate a check of the buffer.
The commands `flymake-goto-next-error' and
`flymake-goto-prev-error' can be used to navigate among Flymake
START and STOP and LEN are as in `after-change-functions'."
(let((new-text (buffer-substring start stop)))
(push (list start stop new-text) flymake--recent-changes)
- (when (and flymake-start-on-newline (equal new-text "\n"))
- (flymake-log :debug "starting syntax check as new-line has been seen")
- (flymake-start t))
(flymake--schedule-timer-maybe)))
(defun flymake-after-save-hook ()