all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: "João Távora" <joaotavora@gmail.com>
Cc: 34294@debbugs.gnu.org
Subject: bug#34294: 27.0.50; flymake-start-on-save-buffer has no effect
Date: Sun, 17 Feb 2019 22:11:27 +0200	[thread overview]
Message-ID: <87k1hy19ug.fsf@mail.linkov.net> (raw)
In-Reply-To: <87bm3rxjkd.fsf@gmail.com> ("João Távora"'s message of "Mon, 04 Feb 2019 22:41:54 +0000")

[-- Attachment #1: Type: text/plain, Size: 267 bytes --]

> Whatever you do to flymake.el, and I forgot to mention this earlier, you
> have to make sure it still loads and works in Emacs 26.1, because
> flymake.el is also distributed through ELPA.

Everything is done in the following patch that doesn't break old versions:


[-- Attachment #2: flymake.el.patch --]
[-- Type: text/x-diff, Size: 4639 bytes --]

diff --git a/etc/TODO b/etc/TODO
index ccb82cd296..dc594a007e 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 261e50a613..ddf12328da 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -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 @@ flymake-fringe-indicator-position
 		 (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 @@ flymake-start-on-flymake-mode
   :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)
@@ -939,12 +943,11 @@ flymake-mode
 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
@@ -1036,7 +1039,7 @@ flymake-after-change-function
 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	other threads:[~2019-02-17 20:11 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-02 21:30 bug#34294: 27.0.50; flymake-start-on-save-buffer has no effect Juri Linkov
2019-02-02 22:40 ` João Távora
2019-02-03 20:42   ` Juri Linkov
2019-02-03 22:10     ` João Távora
2019-02-04 21:24       ` Juri Linkov
2019-02-04 22:41         ` João Távora
2019-02-17 20:11           ` Juri Linkov [this message]
2019-03-18 21:10             ` Juri Linkov
2019-03-18 21:43               ` João Távora
2019-03-19 20:46                 ` Juri Linkov
2019-03-27 21:38                   ` Juri Linkov
2019-04-17 20:29                     ` Juri Linkov
2019-04-18 11:36                       ` João Távora
2019-04-18 20:42                         ` Juri Linkov
2019-04-19  6:35                           ` Eli Zaretskii
2019-04-24 20:25                             ` Juri Linkov
2019-04-25  5:46                               ` Eli Zaretskii
2019-04-25  8:07                               ` martin rudalics
2019-04-29 20:15                                 ` Juri Linkov
2019-05-01  8:29                                   ` martin rudalics
2019-05-01 21:10                                     ` Juri Linkov
2019-05-04 17:34                                       ` martin rudalics
2019-05-04 21:16                                         ` Juri Linkov
2019-05-05  9:04                                           ` martin rudalics
2019-05-05 22:46                                             ` Richard Stallman
2019-05-05 23:09                                               ` João Távora
2019-05-05 20:08 ` Juri Linkov
2019-05-05 23:02   ` João Távora
2019-05-06 20:15     ` Juri Linkov
2019-05-07 20:29       ` Juri Linkov
2019-05-07 23:10         ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1hy19ug.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=34294@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.