Spencer Baugh writes: >>> (funcall visit bbeg bend))))) >>> + (setq next-error-buffer diagnostics-buffer >>> + next-error-last-buffer diagnostics-buffer) > > Setting next-error-last-buffer makes sense and matches other buffers > which set next-error-function (e.g. xref-goto-xref), but do we need to > set next-error-buffer? It seems like setting that is managed by > next-error itself. I think you're right. That should be removed. >>> (define-derived-mode flymake-diagnostics-buffer-mode tabulated-list-mode >>> "Flymake diagnostics" >>> "A mode for listing Flymake diagnostics." >>> @@ -2015,6 +2040,9 @@ flymake-diagnostics-buffer-mode >>> (setq tabulated-list-format flymake--diagnostics-base-tabulated-list-format) >>> (setq tabulated-list-entries >>> 'flymake--diagnostics-buffer-entries) >>> + >>> + (setq-local next-error-function #'flymake--diagnostics-next-error) >>> + > > This should be set in the major mode initialization (the body of the > define-derived-mode). It is set in the body of the define-derived-mode. >>> @@ -2085,6 +2114,9 @@ flymake-project-diagnostics-mode >>> (setq tabulated-list-format >>> (vconcat [("File" 25 t)] >>> flymake--diagnostics-base-tabulated-list-format)) >>> + >>> + (setq-local next-error-function #'flymake--diagnostics-next-error) >>> + > > Likewise, this should be set in the major mode initialization (the body > of the define-derived-mode). Ditto here. See this patch for changes: