Fix some Flymake docstrings and messages
* lisp/progmodes/flymake.el (flymake-start-on-flymake-mode): fix typo. (flymake-mode): Add docstring. (flymake-mode-line-format): Fix help-echo indications. mouse-2 describes flymake-mode.
This commit is contained in:
parent
21e7075781
commit
0f7f677f82
1 changed files with 43 additions and 5 deletions
|
@ -124,7 +124,7 @@ If nil, never start checking buffer automatically like this."
|
||||||
"it no longer has any effect." "26.1")
|
"it no longer has any effect." "26.1")
|
||||||
|
|
||||||
(defcustom flymake-start-on-flymake-mode t
|
(defcustom flymake-start-on-flymake-mode t
|
||||||
"Start syntax check when `pflymake-mode'is enabled.
|
"Start syntax check when `flymake-mode'is enabled.
|
||||||
Specifically, start it when the buffer is actually displayed."
|
Specifically, start it when the buffer is actually displayed."
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
|
@ -751,8 +751,42 @@ Interactively, with a prefix arg, FORCE is t."
|
||||||
"Keymap for `flymake-mode'")
|
"Keymap for `flymake-mode'")
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-minor-mode flymake-mode nil
|
(define-minor-mode flymake-mode
|
||||||
:group 'flymake :lighter flymake--mode-line-format :keymap flymake-mode-map
|
"Toggle Flymake mode on or off.
|
||||||
|
With a prefix argument ARG, enable Flymake mode if ARG is
|
||||||
|
positive, and disable it otherwise. If called from Lisp, enable
|
||||||
|
the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
|
||||||
|
|
||||||
|
Flymake is an Emacs minor mode for on-the-fly syntax checking.
|
||||||
|
Flymake collects diagnostic information from multiple sources,
|
||||||
|
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.
|
||||||
|
|
||||||
|
The commands `flymake-goto-next-error' and
|
||||||
|
`flymake-goto-prev-error' can be used to navigate among Flymake
|
||||||
|
diagnostics annotated in the buffer.
|
||||||
|
|
||||||
|
The visual appearance of each type of diagnostic can be changed
|
||||||
|
in the variable `flymake-diagnostic-types-alist'.
|
||||||
|
|
||||||
|
Activation or deactivation of backends used by Flymake in each
|
||||||
|
buffer happens via the special hook
|
||||||
|
`flymake-diagnostic-functions'.
|
||||||
|
|
||||||
|
Some backends may take longer than others to respond or complete,
|
||||||
|
and some may decide to disable themselves if they are not
|
||||||
|
suitable for the current buffer. The commands
|
||||||
|
`flymake-running-backends', `flymake-disabled-backends' and
|
||||||
|
`flymake-reporting-backends' summarize the situation, as does the
|
||||||
|
special *Flymake log* buffer." :group 'flymake :lighter
|
||||||
|
flymake--mode-line-format :keymap flymake-mode-map
|
||||||
(cond
|
(cond
|
||||||
;; Turning the mode ON.
|
;; Turning the mode ON.
|
||||||
(flymake-mode
|
(flymake-mode
|
||||||
|
@ -945,11 +979,16 @@ applied."
|
||||||
,(concat (format "%s known backends\n" (length known))
|
,(concat (format "%s known backends\n" (length known))
|
||||||
(format "%s running\n" (length running))
|
(format "%s running\n" (length running))
|
||||||
(format "%s disabled\n" (length disabled))
|
(format "%s disabled\n" (length disabled))
|
||||||
"mouse-1: go to log buffer ")
|
"mouse-1: Display minor mode menu\n"
|
||||||
|
"mouse-2: Show help for minor mode")
|
||||||
keymap
|
keymap
|
||||||
,(let ((map (make-sparse-keymap)))
|
,(let ((map (make-sparse-keymap)))
|
||||||
(define-key map [mode-line down-mouse-1]
|
(define-key map [mode-line down-mouse-1]
|
||||||
flymake-menu)
|
flymake-menu)
|
||||||
|
(define-key map [mode-line mouse-2]
|
||||||
|
(lambda ()
|
||||||
|
(interactive)
|
||||||
|
(describe-function 'flymake-mode)))
|
||||||
map))
|
map))
|
||||||
,@(pcase-let ((`(,ind ,face ,explain)
|
,@(pcase-let ((`(,ind ,face ,explain)
|
||||||
(cond ((null known)
|
(cond ((null known)
|
||||||
|
@ -1023,7 +1062,6 @@ applied."
|
||||||
collect a when rest collect
|
collect a when rest collect
|
||||||
'(:propertize " "))
|
'(:propertize " "))
|
||||||
(:propertize "]")))))))
|
(:propertize "]")))))))
|
||||||
|
|
||||||
(provide 'flymake)
|
(provide 'flymake)
|
||||||
|
|
||||||
(require 'flymake-proc)
|
(require 'flymake-proc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue