diff options
author | João Távora <joaotavora@gmail.com> | 2017-10-09 21:51:02 +0100 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2017-10-10 13:08:41 +0100 |
commit | 0f7f677f82677a29a7f5abacbb1045cd26c003c5 (patch) | |
tree | fd8141720f3a5e40dedeade7a6084edae6f22d55 /lisp/progmodes/flymake.el | |
parent | 21e7075781c13bebfac64ed2a2c9749315f9aa1a (diff) | |
download | emacs-0f7f677f82677a29a7f5abacbb1045cd26c003c5.tar.gz emacs-0f7f677f82677a29a7f5abacbb1045cd26c003c5.tar.bz2 emacs-0f7f677f82677a29a7f5abacbb1045cd26c003c5.zip |
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.
Diffstat (limited to 'lisp/progmodes/flymake.el')
-rw-r--r-- | lisp/progmodes/flymake.el | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 53ce73e6a5c..fa0c756ae30 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -124,7 +124,7 @@ If nil, never start checking buffer automatically like this." "it no longer has any effect." "26.1") (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." :type 'boolean) @@ -751,8 +751,42 @@ Interactively, with a prefix arg, FORCE is t." "Keymap for `flymake-mode'") ;;;###autoload -(define-minor-mode flymake-mode nil - :group 'flymake :lighter flymake--mode-line-format :keymap flymake-mode-map +(define-minor-mode flymake-mode + "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 ;; Turning the mode ON. (flymake-mode @@ -945,11 +979,16 @@ applied." ,(concat (format "%s known backends\n" (length known)) (format "%s running\n" (length running)) (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 ,(let ((map (make-sparse-keymap))) (define-key map [mode-line down-mouse-1] flymake-menu) + (define-key map [mode-line mouse-2] + (lambda () + (interactive) + (describe-function 'flymake-mode))) map)) ,@(pcase-let ((`(,ind ,face ,explain) (cond ((null known) @@ -1023,7 +1062,6 @@ applied." collect a when rest collect '(:propertize " ")) (:propertize "]"))))))) - (provide 'flymake) (require 'flymake-proc) |