aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-05-07 23:29:14 +0300
committerJuri Linkov2019-05-07 23:29:14 +0300
commit4cb64ac3f9468422b471d9cc4c8edbc92fab6722 (patch)
tree04592d18f987394a1f72a39ed6032d2adf717f27
parent504f8e551f88b5d58cf3d2dc3c12df273b6d972c (diff)
downloademacs-4cb64ac3f9468422b471d9cc4c8edbc92fab6722.tar.gz
emacs-4cb64ac3f9468422b471d9cc4c8edbc92fab6722.zip
* 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.
-rw-r--r--doc/misc/flymake.texi8
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/progmodes/flymake.el26
3 files changed, 12 insertions, 28 deletions
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 4608d1c973d..ebb89c32036 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -88,10 +88,6 @@ the buffer is saved, unless @code{flymake-start-on-save-buffer} is
88nil; 88nil;
89 89
90@item 90@item
91a newline character is added to the buffer, unless
92@code{flymake-start-on-newline} is nil;
93
94@item
95some changes were made to the buffer more than @code{0.5} seconds ago 91some changes were made to the buffer more than @code{0.5} seconds ago
96(the delay is configurable in @code{flymake-no-changes-timeout}). 92(the delay is configurable in @code{flymake-no-changes-timeout}).
97@end itemize 93@end itemize
@@ -222,10 +218,6 @@ If any changes are made to the buffer, syntax check is automatically
222started after this many seconds, unless the user makes another change, 218started after this many seconds, unless the user makes another change,
223which resets the timer. 219which resets the timer.
224 220
225@item flymake-start-on-newline
226A boolean flag indicating whether to start syntax check immediately
227after a newline character is inserted into the buffer.
228
229@item flymake-start-on-flymake-mode 221@item flymake-start-on-flymake-mode
230A boolean flag indicating whether to start syntax check immediately 222A boolean flag indicating whether to start syntax check immediately
231after enabling @code{flymake-mode}. 223after enabling @code{flymake-mode}.
diff --git a/etc/NEWS b/etc/NEWS
index 72f669a4a40..d10a5532447 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -329,7 +329,7 @@ and directory-local variables.
329a message about the error locus. 329a message about the error locus.
330 330
331--- 331---
332** New variable 'grep-search-path defines' the directories searched for 332** New variable 'grep-search-path' defines the directories searched for
333grep hits (this used to be controlled by 'compilation-search-path'). 333grep hits (this used to be controlled by 'compilation-search-path').
334 334
335--- 335---
@@ -706,8 +706,8 @@ This enables more efficient backends. See the docstring of
706'flymake-diagnostic-functions' or the Flymake manual for details. 706'flymake-diagnostic-functions' or the Flymake manual for details.
707 707
708+++ 708+++
709*** The variable 'flymake-start-syntax-check-on-newline' is obsolete 709*** 'flymake-start-syntax-check-on-newline' is now obsolete,
710and renamed to 'flymake-start-on-newline'. 710use 'post-self-insert-hook' to check on newline.
711 711
712** Ruby 712** Ruby
713 713
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index abe2933c103..4bb657e9535 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -38,9 +38,9 @@
38;; The main interactive entry point is the `flymake-mode' minor mode, 38;; The main interactive entry point is the `flymake-mode' minor mode,
39;; which periodically and automatically initiates checks as the user 39;; which periodically and automatically initiates checks as the user
40;; is editing the buffer. The variables `flymake-no-changes-timeout', 40;; is editing the buffer. The variables `flymake-no-changes-timeout',
41;; `flymake-start-on-newline' and `flymake-start-on-flymake-mode' 41;; `flymake-start-on-flymake-mode' give finer control over the events
42;; give finer control over the events triggering a check, as does the 42;; triggering a check, as does the interactive command `flymake-start',
43;; interactive command `flymake-start', which immediately starts a check. 43;; which immediately starts a check.
44;; 44;;
45;; Shortly after each check, a summary of collected diagnostics should 45;; Shortly after each check, a summary of collected diagnostics should
46;; appear in the mode-line. If it doesn't, there might not be a 46;; 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'."
177 (const right-fringe) 177 (const right-fringe)
178 (const :tag "No fringe indicators" nil))) 178 (const :tag "No fringe indicators" nil)))
179 179
180(define-obsolete-variable-alias 'flymake-start-syntax-check-on-newline 180(make-obsolete-variable 'flymake-start-syntax-check-on-newline
181 'flymake-start-on-newline "27.1") 181 "can check on newline in post-self-insert-hook"
182 182 "27.1")
183(defcustom flymake-start-on-newline t
184 "Start syntax check if newline char was added/removed from the buffer."
185 :type 'boolean)
186 183
187(defcustom flymake-no-changes-timeout 0.5 184(defcustom flymake-no-changes-timeout 0.5
188 "Time to wait after last change before automatically checking buffer. 185 "Time to wait after last change before automatically checking buffer.
189If nil, never start checking buffer automatically like this. 186If nil, never start checking buffer automatically like this."
190You may also want to disable `flymake-start-on-newline'."
191 :type '(choice (number :tag "Timeout in seconds") 187 :type '(choice (number :tag "Timeout in seconds")
192 (const :tag "No check on timeout" nil))) 188 (const :tag "No check on timeout" nil)))
193 189
@@ -947,9 +943,8 @@ results.
947 943
948Flymake performs these checks while the user is editing. 944Flymake performs these checks while the user is editing.
949The customization variables `flymake-start-on-flymake-mode', 945The customization variables `flymake-start-on-flymake-mode',
950`flymake-no-changes-timeout' and `flymake-start-on-newline' 946`flymake-no-changes-timeout' determine the exact circumstances
951determine the exact circumstances whereupon Flymake decides 947whereupon Flymake decides to initiate a check of the buffer.
952to initiate a check of the buffer.
953 948
954The commands `flymake-goto-next-error' and 949The commands `flymake-goto-next-error' and
955`flymake-goto-prev-error' can be used to navigate among Flymake 950`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."
1043START and STOP and LEN are as in `after-change-functions'." 1038START and STOP and LEN are as in `after-change-functions'."
1044 (let((new-text (buffer-substring start stop))) 1039 (let((new-text (buffer-substring start stop)))
1045 (push (list start stop new-text) flymake--recent-changes) 1040 (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))
1049 (flymake--schedule-timer-maybe))) 1041 (flymake--schedule-timer-maybe)))
1050 1042
1051(defun flymake-after-save-hook () 1043(defun flymake-after-save-hook ()