diff options
| author | João Távora | 2017-10-09 21:51:02 +0100 |
|---|---|---|
| committer | João Távora | 2017-10-10 13:08:41 +0100 |
| commit | 0f7f677f82677a29a7f5abacbb1045cd26c003c5 (patch) | |
| tree | fd8141720f3a5e40dedeade7a6084edae6f22d55 | |
| parent | 21e7075781c13bebfac64ed2a2c9749315f9aa1a (diff) | |
| download | emacs-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.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." | |||
| 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. |
| 128 | Specifically, start it when the buffer is actually displayed." | 128 | Specifically, 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. |
| 756 | With a prefix argument ARG, enable Flymake mode if ARG is | ||
| 757 | positive, and disable it otherwise. If called from Lisp, enable | ||
| 758 | the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. | ||
| 759 | |||
| 760 | Flymake is an Emacs minor mode for on-the-fly syntax checking. | ||
| 761 | Flymake collects diagnostic information from multiple sources, | ||
| 762 | called backends, and visually annotates the buffer with the | ||
| 763 | results. | ||
| 764 | |||
| 765 | Flymake performs these checks while the user is editing. The | ||
| 766 | customization variables `flymake-start-on-flymake-mode', | ||
| 767 | `flymake-no-changes-timeout' and | ||
| 768 | `flymake-start-syntax-check-on-newline' determine the exact | ||
| 769 | circumstances whereupon Flymake decides to initiate a check of | ||
| 770 | the buffer. | ||
| 771 | |||
| 772 | The commands `flymake-goto-next-error' and | ||
| 773 | `flymake-goto-prev-error' can be used to navigate among Flymake | ||
| 774 | diagnostics annotated in the buffer. | ||
| 775 | |||
| 776 | The visual appearance of each type of diagnostic can be changed | ||
| 777 | in the variable `flymake-diagnostic-types-alist'. | ||
| 778 | |||
| 779 | Activation or deactivation of backends used by Flymake in each | ||
| 780 | buffer happens via the special hook | ||
| 781 | `flymake-diagnostic-functions'. | ||
| 782 | |||
| 783 | Some backends may take longer than others to respond or complete, | ||
| 784 | and some may decide to disable themselves if they are not | ||
| 785 | suitable for the current buffer. The commands | ||
| 786 | `flymake-running-backends', `flymake-disabled-backends' and | ||
| 787 | `flymake-reporting-backends' summarize the situation, as does the | ||
| 788 | special *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) |