emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 4cb64ac: * lisp/progmodes/flymake.el: Obsolete vari


From: Juri Linkov
Subject: [Emacs-diffs] master 4cb64ac: * lisp/progmodes/flymake.el: Obsolete variable flymake-start-on-newline
Date: Tue, 7 May 2019 16:29:22 -0400 (EDT)

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

    * 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.
---
 doc/misc/flymake.texi     |  8 --------
 etc/NEWS                  |  6 +++---
 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 4608d1c..ebb89c3 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
 nil;
 
 @item
-a newline character is added to the buffer, unless
address@hidden is nil;
-
address@hidden
 some changes were made to the buffer more than @code{0.5} seconds ago
 (the delay is configurable in @code{flymake-no-changes-timeout}).
 @end itemize
@@ -222,10 +218,6 @@ 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-on-newline
-A boolean flag indicating whether to start syntax check immediately
-after a newline character is inserted into the buffer.
-
 @item flymake-start-on-flymake-mode
 A boolean flag indicating whether to start syntax check immediately
 after enabling @code{flymake-mode}.
diff --git a/etc/NEWS b/etc/NEWS
index 72f669a..d10a553 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -329,7 +329,7 @@ and directory-local variables.
 a message about the error locus.
 
 ---
-** New variable 'grep-search-path defines' the directories searched for
+** New variable 'grep-search-path' defines the directories searched for
 grep hits (this used to be controlled by 'compilation-search-path').
 
 ---
@@ -706,8 +706,8 @@ 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'.
+*** 'flymake-start-syntax-check-on-newline' is now obsolete,
+use 'post-self-insert-hook' to check on newline.
 
 ** Ruby
 
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index abe2933..4bb657e 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -38,9 +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-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-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
@@ -177,17 +177,13 @@ See `flymake-error-bitmap' and `flymake-warning-bitmap'."
                 (const right-fringe)
                 (const :tag "No fringe indicators" nil)))
 
-(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)
+(make-obsolete-variable 'flymake-start-syntax-check-on-newline
+                       "can check on newline in post-self-insert-hook"
+                        "27.1")
 
 (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.
-You may also want to disable `flymake-start-on-newline'."
+If nil, never start checking buffer automatically like this."
   :type '(choice (number :tag "Timeout in seconds")
                  (const :tag "No check on timeout" nil)))
 
@@ -947,9 +943,8 @@ 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-on-newline'
-determine the exact circumstances whereupon Flymake decides
-to initiate a check of the buffer.
+`flymake-no-changes-timeout' 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
@@ -1043,9 +1038,6 @@ 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-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)))
 
 (defun flymake-after-save-hook ()



reply via email to

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