Emacs: Flymake fix.
parent
0bcc773ff1
commit
b36dc99f1b
|
@ -262,3 +262,29 @@
|
||||||
;; Common LISP
|
;; Common LISP
|
||||||
;;==============================================================================
|
;;==============================================================================
|
||||||
(setq inferior-lisp-program "clisp")
|
(setq inferior-lisp-program "clisp")
|
||||||
|
|
||||||
|
;;==============================================================================
|
||||||
|
;; Flymake
|
||||||
|
;;==============================================================================
|
||||||
|
|
||||||
|
;; Flymake has a bug that prevents menu from spawning in a console. We redefine
|
||||||
|
;; the function to spawn the error message in the mini-buffer.
|
||||||
|
|
||||||
|
(defun flymake-display-err-message-for-current-line ()
|
||||||
|
"Display a message with errors/warnings for current line if it
|
||||||
|
has errors and/or warnings."
|
||||||
|
(interactive)
|
||||||
|
(let* ((line-no (flymake-current-line-no))
|
||||||
|
(line-err-info-list (nth 0 (flymake-find-err-info flymake-err-info
|
||||||
|
line-no)))
|
||||||
|
(menu-data (flymake-make-err-menu-data line-no
|
||||||
|
line-err-info-list)))
|
||||||
|
(if menu-data
|
||||||
|
(let ((messages))
|
||||||
|
(push (concat (car menu-data) ":") messages)
|
||||||
|
(dolist (error-or-warning (cadr menu-data))
|
||||||
|
(push (car error-or-warning) messages))
|
||||||
|
(message "%s" (mapconcat #'identity (reverse messages) "\n"))))))
|
||||||
|
|
||||||
|
(define-key my-keys-minor-mode-map (kbd "<f10>")
|
||||||
|
'flymake-display-err-message-for-current-line)
|
||||||
|
|
Loading…
Reference in New Issue