[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 2e84179 34/39: Tweak Flymake autoloads and depend
From: |
João Távora |
Subject: |
[Emacs-diffs] emacs-26 2e84179 34/39: Tweak Flymake autoloads and dependencies |
Date: |
Tue, 3 Oct 2017 10:04:53 -0400 (EDT) |
branch: emacs-26
commit 2e84179a291c6fce57d5e6c44121d77160487615
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 060f164..48ec361 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:
@@ -195,6 +207,7 @@ generated it."
(:constructor flymake--diag-make))
buffer beg end type text backend)
+;;;###autoload
(defun flymake-make-diagnostic (buffer
beg
end
@@ -681,9 +694,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
@@ -770,7 +782,6 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
(cancel-timer flymake-timer)
(setq flymake-timer nil)))
-;;;###autoload
(defun flymake-find-file-hook ()
(unless (or flymake-mode
(null flymake-diagnostic-functions))
@@ -956,11 +967,8 @@ applied."
'(:propertize " "))
(:propertize "]")))))))
-
-
-
(provide 'flymake)
(require 'flymake-proc)
-(require 'flymake-elisp)
+
;;; flymake.el ends here
- [Emacs-diffs] emacs-26 b0bb181 15/39: Protect Flymake's eager checks against commands like fill-paragraph, (continued)
- [Emacs-diffs] emacs-26 b0bb181 15/39: Protect Flymake's eager checks against commands like fill-paragraph, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 b2f8b8b 16/39: More Flymake cleanup before advancing to backend redesign, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 22a7372 31/39: Flymake uses proper idle timers, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 87993cd 28/39: Explicitly add a(n empty) keymap for Flymake, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 bb8b663 04/39: Move symbols in flymake-proc.el to separate namespace, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 483f1e8 22/39: A couple of Flymake backends for emacs-lisp-mode, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 5235eaf 25/39: Treat Flymake errors as just another type of diagnostic, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 8118f0f 24/39: Fix three Flymake bugs when checking C header files, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 e0df7b9 21/39: Fancy Flymake mode-line construct displays status, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 cd39edb 26/39: Remove old flymake-display-err-menu-for-current-line, it's useless, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 2e84179 34/39: Tweak Flymake autoloads and dependencies,
João Távora <=
- [Emacs-diffs] emacs-26 7360178 20/39: Tweak Flymake commands flymake-goto-[next/prev]-error, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 1b271ad 27/39: Flymake uses some new fringe bitmaps, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 94a88c1 17/39: New Flymake API variable flymake-diagnostic-functions, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 5d922e5 38/39: Start rewriting Flymake manual, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 fe9dc7a 01/39: Split Flymake into flymake.el into flymake-proc.el (again!), João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 30ea272 35/39: Hook Flymake onto proper checkdoc and byte-compile interfaces, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 5d3f8a8 33/39: Capitalize "Flymake" in docstrings and comments, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 bd8ea88 29/39: Batch of minor Flymake cleanup actions agreed to with Stefan, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 91851c3 30/39: Flymake variable flymake-diagnostic-functions now a special hook, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 f964aa9 37/39: Minimal tweak as an attempt to future-proof Flymake API, João Távora, 2017/10/03