aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-05-05 23:05:01 +0300
committerJuri Linkov2019-05-05 23:05:01 +0300
commitbe3ab9f301bf741b0410c1f9fb1c5ce6dda1c39a (patch)
tree1a24c9a05d78f6c12e4854e64a3a579eb1435b3a
parent4bfde2a79046519815e2bb8a8eb72e22eca0641f (diff)
downloademacs-be3ab9f301bf741b0410c1f9fb1c5ce6dda1c39a.tar.gz
emacs-be3ab9f301bf741b0410c1f9fb1c5ce6dda1c39a.zip
* lisp/progmodes/flymake.el: Rename flymake-start-on-newline (bug#34294)
* lisp/progmodes/flymake.el (flymake-start-on-newline): Rename from flymake-start-syntax-check-on-newline. (flymake-start-syntax-check-on-newline): Define obsolete alias. (flymake-no-changes-timeout): Add customization option nil. * doc/misc/flymake.texi (Using Flymake): Rename variable.
-rw-r--r--doc/misc/flymake.texi4
-rw-r--r--etc/NEWS4
-rw-r--r--etc/TODO9
-rw-r--r--lisp/progmodes/flymake.el35
4 files changed, 25 insertions, 27 deletions
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 894203ca5a1..4608d1c973d 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -89,7 +89,7 @@ nil;
89 89
90@item 90@item
91a newline character is added to the buffer, unless 91a newline character is added to the buffer, unless
92@code{flymake-start-syntax-check-on-newline} is nil; 92@code{flymake-start-on-newline} is nil;
93 93
94@item 94@item
95some changes were made to the buffer more than @code{0.5} seconds ago 95some changes were made to the buffer more than @code{0.5} seconds ago
@@ -222,7 +222,7 @@ If any changes are made to the buffer, syntax check is automatically
222started after this many seconds, unless the user makes another change, 222started after this many seconds, unless the user makes another change,
223which resets the timer. 223which resets the timer.
224 224
225@item flymake-start-syntax-check-on-newline 225@item flymake-start-on-newline
226A boolean flag indicating whether to start syntax check immediately 226A boolean flag indicating whether to start syntax check immediately
227after a newline character is inserted into the buffer. 227after a newline character is inserted into the buffer.
228 228
diff --git a/etc/NEWS b/etc/NEWS
index baec8e7163c..caaffc22818 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -704,6 +704,10 @@ Control whether Flymake starts checking the buffer on save.
704This enables more efficient backends. See the docstring of 704This enables more efficient backends. See the docstring of
705'flymake-diagnostic-functions' or the Flymake manual for details. 705'flymake-diagnostic-functions' or the Flymake manual for details.
706 706
707+++
708*** The variable 'flymake-start-syntax-check-on-newline' is obsolete
709and renamed to 'flymake-start-on-newline'.
710
707** Ruby 711** Ruby
708 712
709*** The Rubocop Flymake diagnostic function will only run Lint cops if 713*** The Rubocop Flymake diagnostic function will only run Lint cops if
diff --git a/etc/TODO b/etc/TODO
index ccb82cd296d..dc594a007ed 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -143,15 +143,6 @@ See the 'test' directory for examples.
143 143
144* Small but important fixes needed in existing features: 144* Small but important fixes needed in existing features:
145 145
146** Flymake's customization mechanism needs to be both simpler (fewer
147levels of indirection) and better documented, so it is easier to
148understand. I find it quite hard to figure out what compilation
149command it will use.
150
151I suggest totally rewriting that part of Flymake, using the simplest
152mechanism that suffices for the specific needs. That will be easy
153for users to customize.
154
155** Distribute a bar cursor of width > 1 evenly between the two glyphs 146** Distribute a bar cursor of width > 1 evenly between the two glyphs
156 on each side of the bar (what to do at the edges?). 147 on each side of the bar (what to do at the edges?).
157 148
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index d6cd370dac4..5c7a7cc0706 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Pavel Kobyakov <pk_at_work@yahoo.com> 5;; Author: Pavel Kobyakov <pk_at_work@yahoo.com>
6;; Maintainer: João Távora <joaotavora@gmail.com> 6;; Maintainer: João Távora <joaotavora@gmail.com>
7;; Version: 1.0.5 7;; Version: 1.0.6
8;; Package-Requires: ((emacs "26.1")) 8;; Package-Requires: ((emacs "26.1"))
9;; Keywords: c languages tools 9;; Keywords: c languages tools
10 10
@@ -38,10 +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-syntax-check-on-newline' and 41;; `flymake-start-on-newline' and `flymake-start-on-flymake-mode'
42;; `flymake-start-on-flymake-mode' give finer control over the events 42;; give finer control over the events triggering a check, as does the
43;; triggering a check, as does the interactive command 43;; interactive command `flymake-start', which immediately starts a check.
44;; `flymake-start', which immediately starts a check.
45;; 44;;
46;; Shortly after each check, a summary of collected diagnostics should 45;; Shortly after each check, a summary of collected diagnostics should
47;; 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
@@ -178,14 +177,19 @@ See `flymake-error-bitmap' and `flymake-warning-bitmap'."
178 (const right-fringe) 177 (const right-fringe)
179 (const :tag "No fringe indicators" nil))) 178 (const :tag "No fringe indicators" nil)))
180 179
181(defcustom flymake-start-syntax-check-on-newline t 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
182 "Start syntax check if newline char was added/removed from the buffer." 184 "Start syntax check if newline char was added/removed from the buffer."
183 :type 'boolean) 185 :type 'boolean)
184 186
185(defcustom flymake-no-changes-timeout 0.5 187(defcustom flymake-no-changes-timeout 0.5
186 "Time to wait after last change before automatically checking buffer. 188 "Time to wait after last change before automatically checking buffer.
187If nil, never start checking buffer automatically like this." 189If nil, never start checking buffer automatically like this.
188 :type 'number) 190You may also want to disable `flymake-start-on-newline'."
191 :type '(choice (number :tag "Timeout in seconds")
192 (const :tag "No check on timeout" nil)))
189 193
190(defcustom flymake-gui-warnings-enabled t 194(defcustom flymake-gui-warnings-enabled t
191 "Enables/disables GUI warnings." 195 "Enables/disables GUI warnings."
@@ -203,7 +207,7 @@ Specifically, start it when the buffer is actually displayed."
203 :type 'boolean) 207 :type 'boolean)
204 208
205(defcustom flymake-start-on-save-buffer t 209(defcustom flymake-start-on-save-buffer t
206 "If non-nil start syntax check when a buffer is saved. 210 "If non-nil, start syntax check when a buffer is saved.
207Specifically, start it when the saved buffer is actually displayed." 211Specifically, start it when the saved buffer is actually displayed."
208 :version "27.1" 212 :version "27.1"
209 :type 'boolean) 213 :type 'boolean)
@@ -940,12 +944,11 @@ Flymake collects diagnostic information from multiple sources,
940called backends, and visually annotates the buffer with the 944called backends, and visually annotates the buffer with the
941results. 945results.
942 946
943Flymake performs these checks while the user is editing. The 947Flymake performs these checks while the user is editing.
944customization variables `flymake-start-on-flymake-mode', 948The customization variables `flymake-start-on-flymake-mode',
945`flymake-no-changes-timeout' and 949`flymake-no-changes-timeout' and `flymake-start-on-newline'
946`flymake-start-syntax-check-on-newline' determine the exact 950determine the exact circumstances whereupon Flymake decides
947circumstances whereupon Flymake decides to initiate a check of 951to initiate a check of the buffer.
948the buffer.
949 952
950The commands `flymake-goto-next-error' and 953The commands `flymake-goto-next-error' and
951`flymake-goto-prev-error' can be used to navigate among Flymake 954`flymake-goto-prev-error' can be used to navigate among Flymake
@@ -1039,7 +1042,7 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
1039START and STOP and LEN are as in `after-change-functions'." 1042START and STOP and LEN are as in `after-change-functions'."
1040 (let((new-text (buffer-substring start stop))) 1043 (let((new-text (buffer-substring start stop)))
1041 (push (list start stop new-text) flymake--recent-changes) 1044 (push (list start stop new-text) flymake--recent-changes)
1042 (when (and flymake-start-syntax-check-on-newline (equal new-text "\n")) 1045 (when (and flymake-start-on-newline (equal new-text "\n"))
1043 (flymake-log :debug "starting syntax check as new-line has been seen") 1046 (flymake-log :debug "starting syntax check as new-line has been seen")
1044 (flymake-start t)) 1047 (flymake-start t))
1045 (flymake--schedule-timer-maybe))) 1048 (flymake--schedule-timer-maybe)))