Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move general flymake configuration to an outboard init file
- Loading branch information
Showing
3 changed files
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(setq flymake-gui-warnings-enabled nil) | ||
|
||
;; Stop flymake from breaking when ruby-mode is invoked by mmm-mode, | ||
;; at which point buffer-file-name is nil | ||
(eval-after-load "flymake" | ||
'(progn | ||
(defun flymake-show-next-error-in-minibuffer () | ||
"Move point to the next flymake error and display the error in the minibuffer" | ||
(interactive) | ||
(flymake-goto-next-error) | ||
(let ((err (get-char-property (point) 'help-echo))) | ||
(when err | ||
(message err)))) | ||
|
||
(global-set-key (kbd "C-`") 'flymake-show-next-error-in-minibuffer) | ||
|
||
(defun flymake-can-syntax-check-file (file-name) | ||
"Determine whether we can syntax check FILE-NAME. | ||
Return nil if we cannot, non-nil if we can." | ||
(if (and file-name (flymake-get-init-function file-name)) t nil)))) | ||
|
||
|
||
(provide 'init-flymake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters