aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2017-10-09 21:51:02 +0100
committerJoão Távora2017-10-10 13:08:41 +0100
commit0f7f677f82677a29a7f5abacbb1045cd26c003c5 (patch)
treefd8141720f3a5e40dedeade7a6084edae6f22d55
parent21e7075781c13bebfac64ed2a2c9749315f9aa1a (diff)
downloademacs-0f7f677f82677a29a7f5abacbb1045cd26c003c5.tar.gz
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.
-rw-r--r--lisp/progmodes/flymake.el48
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."
124 "it no longer has any effect." "26.1") 124 "it no longer has any effect." "26.1")
125 125
126(defcustom flymake-start-on-flymake-mode t 126(defcustom flymake-start-on-flymake-mode t
127 "Start syntax check when `pflymake-mode'is enabled. 127 "Start syntax check when `flymake-mode'is enabled.
128Specifically, start it when the buffer is actually displayed." 128Specifically, start it when the buffer is actually displayed."
129 :type 'boolean) 129 :type 'boolean)
130 130
@@ -751,8 +751,42 @@ Interactively, with a prefix arg, FORCE is t."
751 "Keymap for `flymake-mode'") 751 "Keymap for `flymake-mode'")
752 752
753;;;###autoload 753;;;###autoload
754(define-minor-mode flymake-mode nil 754(define-minor-mode flymake-mode
755 :group 'flymake :lighter flymake--mode-line-format :keymap flymake-mode-map 755 "Toggle Flymake mode on or off.
756With a prefix argument ARG, enable Flymake mode if ARG is
757positive, and disable it otherwise. If called from Lisp, enable
758the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
759
760Flymake is an Emacs minor mode for on-the-fly syntax checking.
761Flymake collects diagnostic information from multiple sources,
762called backends, and visually annotates the buffer with the
763results.
764
765Flymake performs these checks while the user is editing. The
766customization variables `flymake-start-on-flymake-mode',
767`flymake-no-changes-timeout' and
768`flymake-start-syntax-check-on-newline' determine the exact
769circumstances whereupon Flymake decides to initiate a check of
770the buffer.
771
772The commands `flymake-goto-next-error' and
773`flymake-goto-prev-error' can be used to navigate among Flymake
774diagnostics annotated in the buffer.
775
776The visual appearance of each type of diagnostic can be changed
777in the variable `flymake-diagnostic-types-alist'.
778
779Activation or deactivation of backends used by Flymake in each
780buffer happens via the special hook
781`flymake-diagnostic-functions'.
782
783Some backends may take longer than others to respond or complete,
784and some may decide to disable themselves if they are not
785suitable for the current buffer. The commands
786`flymake-running-backends', `flymake-disabled-backends' and
787`flymake-reporting-backends' summarize the situation, as does the
788special *Flymake log* buffer." :group 'flymake :lighter
789 flymake--mode-line-format :keymap flymake-mode-map
756 (cond 790 (cond
757 ;; Turning the mode ON. 791 ;; Turning the mode ON.
758 (flymake-mode 792 (flymake-mode
@@ -945,11 +979,16 @@ applied."
945 ,(concat (format "%s known backends\n" (length known)) 979 ,(concat (format "%s known backends\n" (length known))
946 (format "%s running\n" (length running)) 980 (format "%s running\n" (length running))
947 (format "%s disabled\n" (length disabled)) 981 (format "%s disabled\n" (length disabled))
948 "mouse-1: go to log buffer ") 982 "mouse-1: Display minor mode menu\n"
983 "mouse-2: Show help for minor mode")
949 keymap 984 keymap
950 ,(let ((map (make-sparse-keymap))) 985 ,(let ((map (make-sparse-keymap)))
951 (define-key map [mode-line down-mouse-1] 986 (define-key map [mode-line down-mouse-1]
952 flymake-menu) 987 flymake-menu)
988 (define-key map [mode-line mouse-2]
989 (lambda ()
990 (interactive)
991 (describe-function 'flymake-mode)))
953 map)) 992 map))
954 ,@(pcase-let ((`(,ind ,face ,explain) 993 ,@(pcase-let ((`(,ind ,face ,explain)
955 (cond ((null known) 994 (cond ((null known)
@@ -1023,7 +1062,6 @@ applied."
1023 collect a when rest collect 1062 collect a when rest collect
1024 '(:propertize " ")) 1063 '(:propertize " "))
1025 (:propertize "]"))))))) 1064 (:propertize "]")))))))
1026
1027(provide 'flymake) 1065(provide 'flymake)
1028 1066
1029(require 'flymake-proc) 1067(require 'flymake-proc)