diff options
| author | Juri Linkov | 2019-05-07 23:29:14 +0300 |
|---|---|---|
| committer | Juri Linkov | 2019-05-07 23:29:14 +0300 |
| commit | 4cb64ac3f9468422b471d9cc4c8edbc92fab6722 (patch) | |
| tree | 04592d18f987394a1f72a39ed6032d2adf717f27 | |
| parent | 504f8e551f88b5d58cf3d2dc3c12df273b6d972c (diff) | |
| download | emacs-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.texi | 8 | ||||
| -rw-r--r-- | etc/NEWS | 6 | ||||
| -rw-r--r-- | lisp/progmodes/flymake.el | 26 |
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 | |||
| 88 | nil; | 88 | nil; |
| 89 | 89 | ||
| 90 | @item | 90 | @item |
| 91 | a newline character is added to the buffer, unless | ||
| 92 | @code{flymake-start-on-newline} is nil; | ||
| 93 | |||
| 94 | @item | ||
| 95 | some changes were made to the buffer more than @code{0.5} seconds ago | 91 | some 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 | |||
| 222 | started after this many seconds, unless the user makes another change, | 218 | started after this many seconds, unless the user makes another change, |
| 223 | which resets the timer. | 219 | which resets the timer. |
| 224 | 220 | ||
| 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 | |||
| 229 | @item flymake-start-on-flymake-mode | 221 | @item flymake-start-on-flymake-mode |
| 230 | A boolean flag indicating whether to start syntax check immediately | 222 | A boolean flag indicating whether to start syntax check immediately |
| 231 | after enabling @code{flymake-mode}. | 223 | after enabling @code{flymake-mode}. |
| @@ -329,7 +329,7 @@ and directory-local variables. | |||
| 329 | a message about the error locus. | 329 | a 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 |
| 333 | grep hits (this used to be controlled by 'compilation-search-path'). | 333 | grep 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, |
| 710 | and renamed to 'flymake-start-on-newline'. | 710 | use '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. |
| 189 | If nil, never start checking buffer automatically like this. | 186 | If nil, never start checking buffer automatically like this." |
| 190 | You 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 | ||
| 948 | Flymake performs these checks while the user is editing. | 944 | Flymake performs these checks while the user is editing. |
| 949 | The customization variables `flymake-start-on-flymake-mode', | 945 | The 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 |
| 951 | determine the exact circumstances whereupon Flymake decides | 947 | whereupon Flymake decides to initiate a check of the buffer. |
| 952 | to initiate a check of the buffer. | ||
| 953 | 948 | ||
| 954 | The commands `flymake-goto-next-error' and | 949 | The 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." | |||
| 1043 | START and STOP and LEN are as in `after-change-functions'." | 1038 | START 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 () |