Skip to content

Commit 4cb64ac

Browse files
committed
* lisp/progmodes/flymake.el: Obsolete variable flymake-start-on-newline
(flymake-start-syntax-check-on-newline): Mark it obsolete. (flymake-after-change-function): Remove obsolete variable flymake-start-syntax-check-on-newline (temporarily renamed to flymake-start-on-newline). (Bug#34294) * doc/misc/flymake.texi: Remove obsolete variable.
1 parent 504f8e5 commit 4cb64ac

File tree

3 files changed

+12
-28
lines changed

3 files changed

+12
-28
lines changed

doc/misc/flymake.texi

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ Syntax check is done ``on-the-fly''. It is started whenever
8787
the buffer is saved, unless @code{flymake-start-on-save-buffer} is
8888
nil;
8989

90-
@item
91-
a newline character is added to the buffer, unless
92-
@code{flymake-start-on-newline} is nil;
93-
9490
@item
9591
some changes were made to the buffer more than @code{0.5} seconds ago
9692
(the delay is configurable in @code{flymake-no-changes-timeout}).
@@ -222,10 +218,6 @@ If any changes are made to the buffer, syntax check is automatically
222218
started after this many seconds, unless the user makes another change,
223219
which resets the timer.
224220

225-
@item flymake-start-on-newline
226-
A boolean flag indicating whether to start syntax check immediately
227-
after a newline character is inserted into the buffer.
228-
229221
@item flymake-start-on-flymake-mode
230222
A boolean flag indicating whether to start syntax check immediately
231223
after enabling @code{flymake-mode}.

etc/NEWS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ and directory-local variables.
329329
a message about the error locus.
330330

331331
---
332-
** New variable 'grep-search-path defines' the directories searched for
332+
** New variable 'grep-search-path' defines the directories searched for
333333
grep hits (this used to be controlled by 'compilation-search-path').
334334

335335
---
@@ -706,8 +706,8 @@ This enables more efficient backends. See the docstring of
706706
'flymake-diagnostic-functions' or the Flymake manual for details.
707707

708708
+++
709-
*** The variable 'flymake-start-syntax-check-on-newline' is obsolete
710-
and renamed to 'flymake-start-on-newline'.
709+
*** 'flymake-start-syntax-check-on-newline' is now obsolete,
710+
use 'post-self-insert-hook' to check on newline.
711711

712712
** Ruby
713713

lisp/progmodes/flymake.el

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
;; The main interactive entry point is the `flymake-mode' minor mode,
3939
;; which periodically and automatically initiates checks as the user
4040
;; is editing the buffer. The variables `flymake-no-changes-timeout',
41-
;; `flymake-start-on-newline' and `flymake-start-on-flymake-mode'
42-
;; give finer control over the events triggering a check, as does the
43-
;; interactive command `flymake-start', which immediately starts a check.
41+
;; `flymake-start-on-flymake-mode' give finer control over the events
42+
;; triggering a check, as does the interactive command `flymake-start',
43+
;; which immediately starts a check.
4444
;;
4545
;; Shortly after each check, a summary of collected diagnostics should
4646
;; appear in the mode-line. If it doesn't, there might not be a
@@ -177,17 +177,13 @@ See `flymake-error-bitmap' and `flymake-warning-bitmap'."
177177
(const right-fringe)
178178
(const :tag "No fringe indicators" nil)))
179179

180-
(define-obsolete-variable-alias 'flymake-start-syntax-check-on-newline
181-
'flymake-start-on-newline "27.1")
182-
183-
(defcustom flymake-start-on-newline t
184-
"Start syntax check if newline char was added/removed from the buffer."
185-
:type 'boolean)
180+
(make-obsolete-variable 'flymake-start-syntax-check-on-newline
181+
"can check on newline in post-self-insert-hook"
182+
"27.1")
186183

187184
(defcustom flymake-no-changes-timeout 0.5
188185
"Time to wait after last change before automatically checking buffer.
189-
If nil, never start checking buffer automatically like this.
190-
You may also want to disable `flymake-start-on-newline'."
186+
If nil, never start checking buffer automatically like this."
191187
:type '(choice (number :tag "Timeout in seconds")
192188
(const :tag "No check on timeout" nil)))
193189

@@ -947,9 +943,8 @@ results.
947943
948944
Flymake performs these checks while the user is editing.
949945
The customization variables `flymake-start-on-flymake-mode',
950-
`flymake-no-changes-timeout' and `flymake-start-on-newline'
951-
determine the exact circumstances whereupon Flymake decides
952-
to initiate a check of the buffer.
946+
`flymake-no-changes-timeout' determine the exact circumstances
947+
whereupon Flymake decides to initiate a check of the buffer.
953948
954949
The commands `flymake-goto-next-error' and
955950
`flymake-goto-prev-error' can be used to navigate among Flymake
@@ -1043,9 +1038,6 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
10431038
START and STOP and LEN are as in `after-change-functions'."
10441039
(let((new-text (buffer-substring start stop)))
10451040
(push (list start stop new-text) flymake--recent-changes)
1046-
(when (and flymake-start-on-newline (equal new-text "\n"))
1047-
(flymake-log :debug "starting syntax check as new-line has been seen")
1048-
(flymake-start t))
10491041
(flymake--schedule-timer-maybe)))
10501042

10511043
(defun flymake-after-save-hook ()

0 commit comments

Comments
 (0)