emacs-devel
[Top][All Lists]
Advanced

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

Flymake refactored


From: João Távora
Subject: Flymake refactored
Date: Thu, 28 Sep 2017 15:27:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Hi all,

I think my Flymake refactoring/rewriting effort is nearing
completion. Obviously people to take a look at it before it is
merged to master.

Here are the main changes:

* Flymake now annotates arbitrary buffer regions, not just lines.

* Flymake supports arbitrary diagnostic types, not just errors and
  warnings. See variable flymake-diagnostic-types-alist.

* There is a clean separation between the UI showing the diagnostics
  and the sources of these diagnostics, called backends.

* Flymake supports multiple simultaneous backends, meaning that you can
  check your buffer from different perspectives.

* The "legacy" regexp-based backend still works nicely in my (limited)
  testing. It is enabled by default but lives in a separate file
  lisp/progmodes/flymake-proc.el

* Two backends for Emacs-lisp are provided in
  lisp/progmodes/flymake-elisp.el. Enabling flymake-mode in an elisp
  buffer should activate them.

* Backends are just functions kept in a buffer-local variable. See
  flymake-diagnostic-functions.

* Some colorful fanciness in the mode-line. Still far from flycheck's
  (which is very good) but should be easy to get there.

* In a separate scrap-able commit I bind M-n and M-p in flymake-mode to
  navigate errors. I like it and the keys were unused, but it's probably
  against the rules.

* I started rewriting the manual, but won't go much further until the
  implementation is stabilized.

Regarding backward compatibility:

* I have provided obsolete aliases for most variables and functions,
  at least the ones I though were "public". Probably too many, but
  possibly missed one.

* Steve Purcell's flymake-easy.el adaptor
  (https://github.com/purcell/flymake-easy) seems to work, which is a
  nice surprise. It hooks onto the legacy backend via the obsolete
  aliases.

* Got rid of flymake-display-err-menu-for-current-line, since it wasn't
  doing anything useful anyway.

The code is in the scratch/flymake-refactor branch on Savannah. There
are some 40 proper Changelog-style commits with profuse comments
explaining the changes. You can follow that story or review the final
patch, but keep M-x vc-region-history handy.

Here are a couple of screenshots taken from clean emacs -Q runs after
just M-x flymake-mode.

Attachment: flymake-1.png
Description: PNG image

Attachment: flymake-2.png
Description: PNG image


reply via email to

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