[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 3ecfe98 35/3
From: |
João Távora |
Subject: |
[Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 3ecfe98 35/39: Tweak Flymake autoloads and dependencies |
Date: |
Mon, 2 Oct 2017 20:12:27 -0400 (EDT) |
branch: scratch/flymake-refactor-cleaner-for-emacs-26
commit 3ecfe98cafa031f0e50da0a189434b9e2749e436
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Tweak Flymake autoloads and dependencies
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add to
flymake-diagnostic-functions here.
* lisp/progmodes/flymake-elisp.el[top]: Don't add to
emacs-lisp-mode-hook. Don't call flymake-elisp-setup-backends in
every buffer. (flymake-elisp-checkdoc) (flymake-elisp-byte-compile):
Autoload. (flymake-elisp-setup-backends): Remove.
* lisp/progmodes/flymake.el: Add some top-level comments.
(flymake-make-diagnostic)
(flymake-mode, flymake-mode-on, flymake-mode-off): Add autoloads
Where to fixup this shit?
---
lisp/progmodes/elisp-mode.el | 4 +++-
lisp/progmodes/flymake-elisp.el | 18 ++++--------------
lisp/progmodes/flymake.el | 28 ++++++++++++++++++----------
3 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 2f8e081..cace2bd 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -243,7 +243,9 @@ Blank lines separate paragraphs. Semicolons start comments.
(add-hook 'xref-backend-functions #'elisp--xref-backend nil t)
(setq-local project-vc-external-roots-function #'elisp-load-path-roots)
(add-hook 'completion-at-point-functions
- #'elisp-completion-at-point nil 'local))
+ #'elisp-completion-at-point nil 'local)
+ (add-hook 'flymake-diagnostic-functions #'flymake-elisp-checkdoc nil t)
+ (add-hook 'flymake-diagnostic-functions #'flymake-elisp-byte-compile nil t))
;; Font-locking support.
diff --git a/lisp/progmodes/flymake-elisp.el b/lisp/progmodes/flymake-elisp.el
index 94907e6..b42767c 100644
--- a/lisp/progmodes/flymake-elisp.el
+++ b/lisp/progmodes/flymake-elisp.el
@@ -20,7 +20,8 @@
;;; Commentary:
-;; Flymake backends for elisp work.
+;; Flymake backends for elisp work, `flymake-elisp-checkdoc' and
+;; `flymake-elisp-byte-compile'.
;;; Code:
(require 'flymake)
@@ -45,6 +46,7 @@
(kill-buffer buf))))
collected))
+;;;###autoload
(defun flymake-elisp-checkdoc (report-fn)
"A Flymake backend for `checkdoc'.
Calls REPORT-FN directly."
@@ -98,6 +100,7 @@ Calls REPORT-FN directly."
(defvar-local flymake-elisp--byte-compile-process nil
"Buffer-local process started for byte-compiling the buffer.")
+;;;###autoload
(defun flymake-elisp-byte-compile (report-fn)
"A Flymake backend for elisp byte compilation.
Spawn an Emacs process that byte-compiles a file representing the
@@ -177,18 +180,5 @@ Runs in a batch-mode Emacs. Interactively use variable
(terpri)
(pp collected)))
-(defun flymake-elisp-setup-backends ()
- "Setup Flymake for elisp work."
- (add-hook 'flymake-diagnostic-functions 'flymake-elisp-checkdoc t t)
- (add-hook 'flymake-diagnostic-functions 'flymake-elisp-byte-compile t t))
-
-(add-hook 'emacs-lisp-mode-hook
- 'flymake-elisp-setup-backends)
-
-(dolist (buffer (buffer-list))
- (with-current-buffer buffer
- (when (derived-mode-p 'emacs-lisp-mode)
- (flymake-elisp-setup-backends))))
-
(provide 'flymake-elisp)
;;; flymake-elisp.el ends here
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 2a1fb2d..2485e0f 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -26,9 +26,21 @@
;;
;; Flymake is a minor Emacs mode performing on-the-fly syntax checks.
;;
+;; Flymake collects diagnostic information for multiple sources,
+;; called backends, and visually annotates the relevant portions in
+;; the buffer.
+;;
;; This file contains the UI for displaying and interacting with the
-;; results of such checks, as well as entry points for backends to
-;; hook on to. Backends are sources of diagnostic info.
+;; results produced by these backends, as well as entry points for
+;; backends to hook on to.
+;;
+;; The main entry points are `flymake-mode' and `flymake-start'
+;;
+;; The docstrings of these variabless are relevant to understanding how
+;; Flymake works for both the user and the backend programmer:
+;;
+;; * `flymake-diagnostic-functions'
+;; * `flymake-diagnostic-types-alist'
;;
;;; Code:
@@ -197,6 +209,7 @@ generated it."
(:constructor flymake--diag-make))
buffer beg end type text backend)
+;;;###autoload
(defun flymake-make-diagnostic (buffer
beg
end
@@ -687,9 +700,8 @@ Interactively, with a prefix arg, FORCE is t."
(start))))
(defvar flymake-mode-map
- (let ((map (make-sparse-keymap)))
- map)
- "Keymap for `flymake-mode'.")
+ (let ((map (make-sparse-keymap))) map)
+ "Keymap for `flymake-mode'")
;;;###autoload
(define-minor-mode flymake-mode nil
@@ -756,7 +768,6 @@ Interactively, with a prefix arg, FORCE is t."
(cancel-timer flymake-timer)
(setq flymake-timer nil)))
-;;;###autoload
(defun flymake-find-file-hook ()
(unless (or flymake-mode
(null flymake-diagnostic-functions))
@@ -936,11 +947,8 @@ applied."
'(:propertize " "))
(:propertize "]")))))))
-
-
-
(provide 'flymake)
(require 'flymake-proc)
-(require 'flymake-elisp)
+
;;; flymake.el ends here
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 2971cd0 38/39: Minimal tweak as an attempt to future-proof Flymake API, (continued)
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 2971cd0 38/39: Minimal tweak as an attempt to future-proof Flymake API, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 c1661fc 36/39: Hook Flymake onto proper checkdoc and byte-compile interfaces, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 38fdbd6 34/39: Capitalize "Flymake" in docstrings and comments, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 b80d29d 39/39: Start rewriting Flymake manual, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 b4099cb 18/39: New Flymake API variable flymake-diagnostic-functions, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 a506cc6 25/39: Fix three Flymake bugs when checking C header files, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 de4e13a 17/39: More Flymake cleanup before advancing to backend redesign, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 fd9e32c 15/39: Flymake highlights GCC info/notes as detected by flymake-proc.el, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 be9dd4c 32/39: Improve use of flymake-no-changes-timeout, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 8f0f9cc 28/39: Flymake uses some new fringe bitmaps, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 3ecfe98 35/39: Tweak Flymake autoloads and dependencies,
João Távora <=
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 26ac964 23/39: A couple of Flymake backends for emacs-lisp-mode, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 fbc6359 31/39: Flymake variable flymake-diagnostic-functions now a special hook, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 4a110bf 22/39: Fancy Flymake mode-line construct displays status, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 fc30b6b 19/39: Simplify Flymake logging and erroring, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 6a5e6ad 05/39: Flymake diagnostics now apply to arbitrary buffer regions, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 3169bd9 37/39: Integrate elisp checkers into elisp-mode.el directly, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 1f40144 04/39: Move symbols in flymake-proc.el to separate namespace, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 5f0e3328 30/39: A batch of minor flymake cleanup actions agreed to with Stefan, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 71776ec 01/39: Split Flymake into flymake.el into flymake-proc.el (again!), João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 ea36cec 33/39: Flymake backends can report multiple times per check, João Távora, 2017/10/02