mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
* 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.
This commit is contained in:
parent
4bfde2a790
commit
be3ab9f301
@ -89,7 +89,7 @@ nil;
|
||||
|
||||
@item
|
||||
a newline character is added to the buffer, unless
|
||||
@code{flymake-start-syntax-check-on-newline} is nil;
|
||||
@code{flymake-start-on-newline} is nil;
|
||||
|
||||
@item
|
||||
some 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
|
||||
started after this many seconds, unless the user makes another change,
|
||||
which resets the timer.
|
||||
|
||||
@item flymake-start-syntax-check-on-newline
|
||||
@item flymake-start-on-newline
|
||||
A boolean flag indicating whether to start syntax check immediately
|
||||
after a newline character is inserted into the buffer.
|
||||
|
||||
|
4
etc/NEWS
4
etc/NEWS
@ -704,6 +704,10 @@ Control whether Flymake starts checking the buffer on save.
|
||||
This enables more efficient backends. See the docstring of
|
||||
'flymake-diagnostic-functions' or the Flymake manual for details.
|
||||
|
||||
+++
|
||||
*** The variable 'flymake-start-syntax-check-on-newline' is obsolete
|
||||
and renamed to 'flymake-start-on-newline'.
|
||||
|
||||
** Ruby
|
||||
|
||||
*** The Rubocop Flymake diagnostic function will only run Lint cops if
|
||||
|
9
etc/TODO
9
etc/TODO
@ -143,15 +143,6 @@ See the 'test' directory for examples.
|
||||
|
||||
* Small but important fixes needed in existing features:
|
||||
|
||||
** Flymake's customization mechanism needs to be both simpler (fewer
|
||||
levels of indirection) and better documented, so it is easier to
|
||||
understand. I find it quite hard to figure out what compilation
|
||||
command it will use.
|
||||
|
||||
I suggest totally rewriting that part of Flymake, using the simplest
|
||||
mechanism that suffices for the specific needs. That will be easy
|
||||
for users to customize.
|
||||
|
||||
** Distribute a bar cursor of width > 1 evenly between the two glyphs
|
||||
on each side of the bar (what to do at the edges?).
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
;; Author: Pavel Kobyakov <pk_at_work@yahoo.com>
|
||||
;; Maintainer: João Távora <joaotavora@gmail.com>
|
||||
;; Version: 1.0.5
|
||||
;; Version: 1.0.6
|
||||
;; Package-Requires: ((emacs "26.1"))
|
||||
;; Keywords: c languages tools
|
||||
|
||||
@ -38,10 +38,9 @@
|
||||
;; The main interactive entry point is the `flymake-mode' minor mode,
|
||||
;; which periodically and automatically initiates checks as the user
|
||||
;; is editing the buffer. The variables `flymake-no-changes-timeout',
|
||||
;; `flymake-start-syntax-check-on-newline' and
|
||||
;; `flymake-start-on-flymake-mode' give finer control over the events
|
||||
;; triggering a check, as does the interactive command
|
||||
;; `flymake-start', which immediately starts a check.
|
||||
;; `flymake-start-on-newline' and `flymake-start-on-flymake-mode'
|
||||
;; give finer control over the events triggering a check, as does the
|
||||
;; interactive command `flymake-start', which immediately starts a check.
|
||||
;;
|
||||
;; Shortly after each check, a summary of collected diagnostics should
|
||||
;; 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'."
|
||||
(const right-fringe)
|
||||
(const :tag "No fringe indicators" nil)))
|
||||
|
||||
(defcustom flymake-start-syntax-check-on-newline t
|
||||
(define-obsolete-variable-alias 'flymake-start-syntax-check-on-newline
|
||||
'flymake-start-on-newline "27.1")
|
||||
|
||||
(defcustom flymake-start-on-newline t
|
||||
"Start syntax check if newline char was added/removed from the buffer."
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom flymake-no-changes-timeout 0.5
|
||||
"Time to wait after last change before automatically checking buffer.
|
||||
If nil, never start checking buffer automatically like this."
|
||||
:type 'number)
|
||||
If nil, never start checking buffer automatically like this.
|
||||
You may also want to disable `flymake-start-on-newline'."
|
||||
:type '(choice (number :tag "Timeout in seconds")
|
||||
(const :tag "No check on timeout" nil)))
|
||||
|
||||
(defcustom flymake-gui-warnings-enabled t
|
||||
"Enables/disables GUI warnings."
|
||||
@ -203,7 +207,7 @@ Specifically, start it when the buffer is actually displayed."
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom flymake-start-on-save-buffer t
|
||||
"If non-nil start syntax check when a buffer is saved.
|
||||
"If non-nil, start syntax check when a buffer is saved.
|
||||
Specifically, start it when the saved buffer is actually displayed."
|
||||
:version "27.1"
|
||||
:type 'boolean)
|
||||
@ -940,12 +944,11 @@ Flymake collects diagnostic information from multiple sources,
|
||||
called backends, and visually annotates the buffer with the
|
||||
results.
|
||||
|
||||
Flymake performs these checks while the user is editing. The
|
||||
customization variables `flymake-start-on-flymake-mode',
|
||||
`flymake-no-changes-timeout' and
|
||||
`flymake-start-syntax-check-on-newline' determine the exact
|
||||
circumstances whereupon Flymake decides to initiate a check of
|
||||
the buffer.
|
||||
Flymake performs these checks while the user is editing.
|
||||
The customization variables `flymake-start-on-flymake-mode',
|
||||
`flymake-no-changes-timeout' and `flymake-start-on-newline'
|
||||
determine the exact circumstances whereupon Flymake decides
|
||||
to initiate a check of the buffer.
|
||||
|
||||
The commands `flymake-goto-next-error' and
|
||||
`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."
|
||||
START and STOP and LEN are as in `after-change-functions'."
|
||||
(let((new-text (buffer-substring start stop)))
|
||||
(push (list start stop new-text) flymake--recent-changes)
|
||||
(when (and flymake-start-syntax-check-on-newline (equal new-text "\n"))
|
||||
(when (and flymake-start-on-newline (equal new-text "\n"))
|
||||
(flymake-log :debug "starting syntax check as new-line has been seen")
|
||||
(flymake-start t))
|
||||
(flymake--schedule-timer-maybe)))
|
||||
|
Loading…
Reference in New Issue
Block a user