Skip to content

Instantly share code, notes, and snippets.

@miyucy
Created February 2, 2010 17:08
Show Gist options
  • Save miyucy/292827 to your computer and use it in GitHub Desktop.
Save miyucy/292827 to your computer and use it in GitHub Desktop.
;; flymake 現在行のエラーをpopup.elのツールチップで表示する
(defun flymake-display-err-menu-for-current-line ()
(interactive)
(let* ((line-no (flymake-current-line-no))
(line-err-info-list (nth 0 (flymake-find-err-info flymake-err-info line-no))))
(when line-err-info-list
(let* ((count (length line-err-info-list))
(menu-item-text nil))
(while (> count 0)
(setq menu-item-text (flymake-ler-text (nth (1- count) line-err-info-list)))
(let* ((file (flymake-ler-file (nth (1- count) line-err-info-list)))
(line (flymake-ler-line (nth (1- count) line-err-info-list))))
(if file
(setq menu-item-text (concat menu-item-text " - " file "(" (format "%d" line) ")"))))
(setq count (1- count))
(if (> count 0) (setq menu-item-text (concat menu-item-text "\n")))
)
(popup-tip menu-item-text)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment