emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master be3ab9f: * lisp/progmodes/flymake.el: Rename flymak


From: Juri Linkov
Subject: [Emacs-diffs] master be3ab9f: * lisp/progmodes/flymake.el: Rename flymake-start-on-newline (bug#34294)
Date: Sun, 5 May 2019 16:05:08 -0400 (EDT)

branch: master
commit be3ab9f301bf741b0410c1f9fb1c5ce6dda1c39a
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * 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.
---
 doc/misc/flymake.texi     |  4 ++--
 etc/NEWS                  |  4 ++++
 etc/TODO                  |  9 ---------
 lisp/progmodes/flymake.el | 35 +++++++++++++++++++----------------
 4 files changed, 25 insertions(+), 27 deletions(-)

diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 894203c..4608d1c 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -89,7 +89,7 @@ nil;
 
 @item
 a newline character is added to the buffer, unless
address@hidden is nil;
address@hidden 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.
 
address@hidden flymake-start-syntax-check-on-newline
address@hidden flymake-start-on-newline
 A boolean flag indicating whether to start syntax check immediately
 after a newline character is inserted into the buffer.
 
diff --git a/etc/NEWS b/etc/NEWS
index baec8e7..caaffc2 100644
--- a/etc/NEWS
+++ b/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
diff --git a/etc/TODO b/etc/TODO
index ccb82cd..dc594a0 100644
--- a/etc/TODO
+++ b/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?).
 
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index d6cd370..5c7a7cc 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -4,7 +4,7 @@
 
 ;; Author:  Pavel Kobyakov <address@hidden>
 ;; Maintainer: João Távora <address@hidden>
-;; 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]