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 /lisp | |
| 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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/progmodes/flymake.el | 26 |
1 files changed, 9 insertions, 17 deletions
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 () |