aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/flymake-elisp.el4
-rw-r--r--lisp/progmodes/flymake-proc.el12
-rw-r--r--lisp/progmodes/flymake.el43
3 files changed, 30 insertions, 29 deletions
diff --git a/lisp/progmodes/flymake-elisp.el b/lisp/progmodes/flymake-elisp.el
index f54badfc833..94907e66cc5 100644
--- a/lisp/progmodes/flymake-elisp.el
+++ b/lisp/progmodes/flymake-elisp.el
@@ -46,7 +46,7 @@
46 collected)) 46 collected))
47 47
48(defun flymake-elisp-checkdoc (report-fn) 48(defun flymake-elisp-checkdoc (report-fn)
49 "A flymake backend for `checkdoc'. 49 "A Flymake backend for `checkdoc'.
50Calls REPORT-FN directly." 50Calls REPORT-FN directly."
51 (unless (derived-mode-p 'emacs-lisp-mode) 51 (unless (derived-mode-p 'emacs-lisp-mode)
52 (error "Can only work on `emacs-lisp-mode' buffers")) 52 (error "Can only work on `emacs-lisp-mode' buffers"))
@@ -178,7 +178,7 @@ Runs in a batch-mode Emacs. Interactively use variable
178 (pp collected))) 178 (pp collected)))
179 179
180(defun flymake-elisp-setup-backends () 180(defun flymake-elisp-setup-backends ()
181 "Setup flymake for elisp work." 181 "Setup Flymake for elisp work."
182 (add-hook 'flymake-diagnostic-functions 'flymake-elisp-checkdoc t t) 182 (add-hook 'flymake-diagnostic-functions 'flymake-elisp-checkdoc t t)
183 (add-hook 'flymake-diagnostic-functions 'flymake-elisp-byte-compile t t)) 183 (add-hook 'flymake-diagnostic-functions 'flymake-elisp-byte-compile t t))
184 184
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el
index b0ee7d65025..b76d18ed313 100644
--- a/lisp/progmodes/flymake-proc.el
+++ b/lisp/progmodes/flymake-proc.el
@@ -110,14 +110,14 @@ NAME is the file name function to use, default `flymake-proc-get-real-file-name'
110 function)))) 110 function))))
111 111
112(defvar-local flymake-proc--current-process nil 112(defvar-local flymake-proc--current-process nil
113 "Currently active flymake process for a buffer, if any.") 113 "Currently active Flymake process for a buffer, if any.")
114 114
115(defvar flymake-proc--report-fn nil 115(defvar flymake-proc--report-fn nil
116 "If bound, function used to report back to flymake's UI.") 116 "If bound, function used to report back to flymake's UI.")
117 117
118(defun flymake-proc-reformat-err-line-patterns-from-compile-el (original-list) 118(defun flymake-proc-reformat-err-line-patterns-from-compile-el (original-list)
119 "Grab error line patterns from ORIGINAL-LIST in compile.el format. 119 "Grab error line patterns from ORIGINAL-LIST in compile.el format.
120Convert it to flymake internal format." 120Convert it to Flymake internal format."
121 (let* ((converted-list '())) 121 (let* ((converted-list '()))
122 (dolist (item original-list) 122 (dolist (item original-list)
123 (setq item (cdr item)) 123 (setq item (cdr item))
@@ -624,7 +624,7 @@ Create parent directories as needed."
624 (kill-buffer output-buffer))))))) 624 (kill-buffer output-buffer)))))))
625 625
626(defun flymake-proc--panic (problem explanation) 626(defun flymake-proc--panic (problem explanation)
627 "Tell flymake UI about a fatal PROBLEM with this backend. 627 "Tell Flymake UI about a fatal PROBLEM with this backend.
628May only be called in a dynamic environment where 628May only be called in a dynamic environment where
629`flymake-proc--dynamic-report-fn' is bound" 629`flymake-proc--dynamic-report-fn' is bound"
630 (flymake-log 0 "%s: %s" problem explanation) 630 (flymake-log 0 "%s: %s" problem explanation)
@@ -716,7 +716,7 @@ May only be called in a dynamic environment where
716 716
717 717
718(defun flymake-proc-legacy-flymake (report-fn &optional interactive) 718(defun flymake-proc-legacy-flymake (report-fn &optional interactive)
719 "Flymake backend based on the original flymake implementation. 719 "Flymake backend based on the original Flymake implementation.
720This function is suitable for inclusion in 720This function is suitable for inclusion in
721`flymake-diagnostic-types-alist'. For backward compatibility, it 721`flymake-diagnostic-types-alist'. For backward compatibility, it
722can also be executed interactively independently of 722can also be executed interactively independently of
@@ -738,7 +738,7 @@ can also be executed interactively independently of
738 (when (process-live-p proc) 738 (when (process-live-p proc)
739 (when interactive 739 (when interactive
740 (user-error 740 (user-error
741 "There's already a flymake process running in this buffer") 741 "There's already a Flymake process running in this buffer")
742 (kill-process proc)))) 742 (kill-process proc))))
743 (when 743 (when
744 ;; A number of situations make us not want to error right away 744 ;; A number of situations make us not want to error right away
@@ -815,7 +815,7 @@ can also be executed interactively independently of
815 compilation-in-progress)) 815 compilation-in-progress))
816 816
817(defun flymake-proc-compile () 817(defun flymake-proc-compile ()
818 "Kill all flymake syntax checks, start compilation." 818 "Kill all Flymake syntax checks, start compilation."
819 (interactive) 819 (interactive)
820 (flymake-proc-stop-all-syntax-checks "Stopping for proper compilation") 820 (flymake-proc-stop-all-syntax-checks "Stopping for proper compilation")
821 (call-interactively 'compile)) 821 (call-interactively 'compile))
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index d1673977762..060f164b794 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -88,7 +88,7 @@ this is used."
88 (face :tag "Face")))) 88 (face :tag "Face"))))
89 89
90(defcustom flymake-fringe-indicator-position 'left-fringe 90(defcustom flymake-fringe-indicator-position 'left-fringe
91 "The position to put flymake fringe indicator. 91 "The position to put Flymake fringe indicator.
92The value can be nil (do not use indicators), `left-fringe' or `right-fringe'. 92The value can be nil (do not use indicators), `left-fringe' or `right-fringe'.
93See `flymake-error-bitmap' and `flymake-warning-bitmap'." 93See `flymake-error-bitmap' and `flymake-warning-bitmap'."
94 :version "24.3" 94 :version "24.3"
@@ -200,7 +200,7 @@ generated it."
200 end 200 end
201 type 201 type
202 text) 202 text)
203 "Make a flymake diagnostic for BUFFER's region from BEG to END. 203 "Make a Flymake diagnostic for BUFFER's region from BEG to END.
204TYPE is a key to `flymake-diagnostic-types-alist' and TEXT is a 204TYPE is a key to `flymake-diagnostic-types-alist' and TEXT is a
205description of the problem detected in this region." 205description of the problem detected in this region."
206 (flymake--diag-make :buffer buffer :beg beg :end end :type type :text text)) 206 (flymake--diag-make :buffer buffer :beg beg :end end :type type :text text))
@@ -239,7 +239,7 @@ verify FILTER, a function, and sort them by COMPARE (using KEY)."
239 ovs)))) 239 ovs))))
240 240
241(defun flymake-delete-own-overlays (&optional filter) 241(defun flymake-delete-own-overlays (&optional filter)
242 "Delete all flymake overlays in BUFFER." 242 "Delete all Flymake overlays in BUFFER."
243 (mapc #'delete-overlay (flymake--overlays :filter filter))) 243 (mapc #'delete-overlay (flymake--overlays :filter filter)))
244 244
245(defface flymake-error 245(defface flymake-error
@@ -315,12 +315,12 @@ about where and how to annotate problems diagnosed in a buffer.
315 315
316Whenever Flymake or the user decides to re-check the buffer, each 316Whenever Flymake or the user decides to re-check the buffer, each
317function is called with a common calling convention, a single 317function is called with a common calling convention, a single
318REPORT-FN argument, detailed below. Backend functions are 318REPORT-FN argument and a list of keword value pairs, detailed
319expected to initiate the buffer check, but aren't required to 319below. Backend functions are expected to initiate the buffer
320complete it check before exiting: if the computation involved is 320check, but aren't required to complete it check before exiting:
321expensive, especially for large buffers, that task can be 321if the computation involved is expensive, especially for large
322scheduled for the future using asynchronous processes or other 322buffers, that task can be scheduled for the future using
323asynchronous mechanisms. 323asynchronous processes or other asynchronous mechanisms.
324 324
325In any case, backend functions are expected to return quickly or 325In any case, backend functions are expected to return quickly or
326signal an error, in which case the backend is disabled. Flymake 326signal an error, in which case the backend is disabled. Flymake
@@ -331,7 +331,7 @@ and on again, reset the list of disabled backends.
331If the function returns, Flymake considers the backend to be 331If the function returns, Flymake considers the backend to be
332\"running\". If it has not done so already, the backend is 332\"running\". If it has not done so already, the backend is
333expected to call the function REPORT-FN with a single argument 333expected to call the function REPORT-FN with a single argument
334ACTION followed by an optional list of keyword arguments and 334ACTION followed by an optional list of keyword-value pairs
335their values (:KEY1 VALUE1 :KEY2 VALUE2...). 335their values (:KEY1 VALUE1 :KEY2 VALUE2...).
336 336
337The possible values for ACTION are. 337The possible values for ACTION are.
@@ -367,7 +367,7 @@ The recognized optional keyword arguments are:
367 . ((flymake-category . flymake-warning))) 367 . ((flymake-category . flymake-warning)))
368 (:note 368 (:note
369 . ((flymake-category . flymake-note)))) 369 . ((flymake-category . flymake-note))))
370 "Alist ((KEY . PROPS)*) of properties of flymake error types. 370 "Alist ((KEY . PROPS)*) of properties of Flymake error types.
371KEY can be anything passed as `:type' to `flymake-diag-make'. 371KEY can be anything passed as `:type' to `flymake-diag-make'.
372 372
373PROPS is an alist of properties that are applied, in order, to 373PROPS is an alist of properties that are applied, in order, to
@@ -486,7 +486,7 @@ associated `flymake-category' return DEFAULT."
486 (overlay-put ov 'flymake t) 486 (overlay-put ov 'flymake t)
487 (overlay-put ov 'flymake--diagnostic diagnostic))) 487 (overlay-put ov 'flymake--diagnostic diagnostic)))
488 488
489;; Nothing in flymake uses this at all any more, so this is just for 489;; Nothing in Flymake uses this at all any more, so this is just for
490;; third-party compatibility. 490;; third-party compatibility.
491(define-obsolete-function-alias 'flymake-display-warning 'message-box "26.1") 491(define-obsolete-function-alias 'flymake-display-warning 'message-box "26.1")
492 492
@@ -528,10 +528,11 @@ present the backend is disabled.")
528 ,@body))) 528 ,@body)))
529 529
530(defun flymake-is-running () 530(defun flymake-is-running ()
531 "Tell if flymake has running backends in this buffer" 531 "Tell if Flymake has running backends in this buffer"
532 (flymake-running-backends)) 532 (flymake-running-backends))
533 533
534(cl-defun flymake--handle-report (backend token action &key explanation force) 534(cl-defun flymake--handle-report (backend token action
535 &key explanation force)
535 "Handle reports from BACKEND identified by TOKEN. 536 "Handle reports from BACKEND identified by TOKEN.
536 537
537BACKEND, ACTION and EXPLANATION, and FORCE conform to the calling 538BACKEND, ACTION and EXPLANATION, and FORCE conform to the calling
@@ -590,8 +591,8 @@ not expected."
590 591
591(defun flymake-make-report-fn (backend &optional token) 592(defun flymake-make-report-fn (backend &optional token)
592 "Make a suitable anonymous report function for BACKEND. 593 "Make a suitable anonymous report function for BACKEND.
593BACKEND is used to help flymake distinguish different diagnostic 594BACKEND is used to help Flymake distinguish different diagnostic
594sources. If provided, TOKEN helps flymake distinguish between 595sources. If provided, TOKEN helps Flymake distinguish between
595different runs of the same backend." 596different runs of the same backend."
596 (let ((buffer (current-buffer))) 597 (let ((buffer (current-buffer)))
597 (lambda (&rest args) 598 (lambda (&rest args)
@@ -740,12 +741,12 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
740 741
741;;;###autoload 742;;;###autoload
742(defun flymake-mode-on () 743(defun flymake-mode-on ()
743 "Turn flymake mode on." 744 "Turn Flymake mode on."
744 (flymake-mode 1)) 745 (flymake-mode 1))
745 746
746;;;###autoload 747;;;###autoload
747(defun flymake-mode-off () 748(defun flymake-mode-off ()
748 "Turn flymake mode off." 749 "Turn Flymake mode off."
749 (flymake-mode 0)) 750 (flymake-mode 0))
750 751
751(make-obsolete 'flymake-mode-on 'flymake-mode "26.1") 752(make-obsolete 'flymake-mode-on 'flymake-mode "26.1")
@@ -777,7 +778,7 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
777 (flymake-log :warning "Turned on in `flymake-find-file-hook'"))) 778 (flymake-log :warning "Turned on in `flymake-find-file-hook'")))
778 779
779(defun flymake-goto-next-error (&optional n filter interactive) 780(defun flymake-goto-next-error (&optional n filter interactive)
780 "Go to Nth next flymake error in buffer matching FILTER. 781 "Go to Nth next Flymake error in buffer matching FILTER.
781 782
782Interactively, always move to the next error. Interactively, and 783Interactively, always move to the next error. Interactively, and
783with a prefix arg, skip any diagnostics with a severity less than 784with a prefix arg, skip any diagnostics with a severity less than
@@ -827,13 +828,13 @@ applied."
827 (funcall (overlay-get target 'help-echo) 828 (funcall (overlay-get target 'help-echo)
828 nil nil (point))))) 829 nil nil (point)))))
829 (interactive 830 (interactive
830 (user-error "No more flymake errors%s" 831 (user-error "No more Flymake errors%s"
831 (if filter 832 (if filter
832 (format " of types %s" filter) 833 (format " of types %s" filter)
833 "")))))) 834 ""))))))
834 835
835(defun flymake-goto-prev-error (&optional n filter interactive) 836(defun flymake-goto-prev-error (&optional n filter interactive)
836 "Go to Nth previous flymake error in buffer matching FILTER. 837 "Go to Nth previous Flymake error in buffer matching FILTER.
837 838
838Interactively, always move to the previous error. Interactively, 839Interactively, always move to the previous error. Interactively,
839and with a prefix arg, skip any diagnostics with a severity less 840and with a prefix arg, skip any diagnostics with a severity less