"Show location of diagnostic at POS.
POS can be a buffer position or a button"
(interactive "d" flymake-diagnostics-buffer-mode)
- (pop-to-buffer
- (flymake-diagnostics-buffer-show-diagnostic
- (if (button-type pos) (button-start pos) pos))))
+ (let ((diags-buf (current-buffer)))
+ (pop-to-buffer
+ (flymake-diagnostics-buffer-show-diagnostic
+ (if (button-type pos) (button-start pos) pos)))
+ (next-error-found diags-buf (current-buffer))))
(defun flymake--tabulated-diagnostic-origin (diag)
(or (flymake-diagnostic-origin diag)
(point-min)
flymake-current-diagnostic-pos))
(forward-line n)
+ (setq overlay-arrow-position
+ (set-marker (or overlay-arrow-position (make-marker))
+ (line-beginning-position)))
(setq flymake-current-diagnostic-pos (point)))))
(define-derived-mode flymake-diagnostics-buffer-mode tabulated-list-mode
"A mode for listing Flymake diagnostics."
:interactive nil
(setq tabulated-list-format flymake--diagnostics-base-tabulated-list-format
- tabulated-list-entries 'flymake--diagnostics-buffer-entries)
+ tabulated-list-entries 'flymake--diagnostics-buffer-entries
+ next-error-last-buffer (current-buffer))
(setq-local next-error-function #'flymake--diagnostics-next-error)
(tabulated-list-init-header))
(vconcat [("File" 25 t)]
flymake--diagnostics-base-tabulated-list-format))
(setq tabulated-list-entries 'flymake--project-diagnostics-entries)
- (setq-local next-error-function #'flymake--diagnostics-next-error)
(tabulated-list-init-header))
(cl-defun flymake--project-diagnostics (&optional (project (project-current)))
(interactive
(list (get-buffer
(read-buffer "Select next-error buffer: " nil nil
- (compf next-error-buffer-p cdr)))))
+ (compf next-error-buffer-p get-buffer)))))
(setq next-error-last-buffer buffer))
(defalias 'goto-next-locus 'next-error)