Skip to content

Instantly share code, notes, and snippets.

@miyucy miyucy/gist:292827
Created Feb 2, 2010

Embed
What would you like to do?
;; 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
You can’t perform that action at this time.