In matlab-shell, we currently have ```emacs-lisp (substitute-key-definition #'next-error #'matlab-shell-last-error km global-map) ``` We should set next-error-function and update matlab-shell-last-error to accept the appropriate arguments.