Make finding errors more robust.
(matlab-shell-render-errors-as-anchor):
Compute actual full file here, and store on the URL instead of using
the matlab reference name.
Improve behavior of return key in this preceeding history text of the shell.
(matlab-shell-mode):
Set comint-get-old-input to below.
(matlab-comint-get-old-input): New.
Only return text to evauate if it was on a prompt before.
(matlab-find-other-window-file-line-column):
If input file fails to translate into a file name, issue a descriptive
error instead of passing nil to find-file-other-window.
Improve error highlighting.
(matlab-shell-render-errors-as-anchor): Fix scanning for the first error
in a session.
(matlab-shell-class-mref-to-file): Add fcn-p flag.
When t, convert to a function name in a package.
(matlab-shell-mref-converters): Add expression to
match functions in a package.
tests/+eltest/+utils/testme.m:
New function in a package that throws an error.
Initialize netshell on regular shell startup based on config.
(matlab-shell): Fix netshell server start (don't do it twice.)
(matlab-shell-render-errors-as-anchor): Fix bug if no errors in shell yet.
(gud-matlab-marker-filter): When sending emacsinit command,
also send netshell start command if configured to do so.
Improve command parsing / error handling.
(matlab-netshell-client): New helper.
(matlab-netshell-execute-command): Handle new commands
output, and error.
(matlab-netshell-eval): Designed for sending an eval command
(matlab-netshell-evalc): Designed for sending an evalc command
matlab-shell.el:
Integrate netshell support.
(matlab-shell-autostart-netshell): New option.
(matlab-netshell-active-p, matlab-any-shell-active-p): New
(matlab-shell-send-command): New wrapper around send-string
or netshell command send.
(matlab-shell-save-and-go): Integrate matlab-netshell.
Improve finding if we need to CD somewhere.
Use 'run' to run things not on the path.
Select between netshell or regular shell.
(matlab-shell-run-region): If netshell is available, use it
to send region to MATLAB.
matlab.el:
Fix menus that need a shell.
(matlab-frame-init): For commands that need a shell, now use
`matlab-any-shell-active-p'.
Fixup error parsing and file finding to support classes.
(matlab-shell-render-errors-as-anchor):
Fix how last-anchor is tracked.
(matlab-shell-class-mref-to-file):
New converter. Takes package.class/method and converts to the
file +package/@class/class.m
(matlab-shell-mref-converters): Add above.
New way for running regions.
(matlab-shell-region-command):
Use new command below if buffer has a file.
(matlab-shell-run-region-internal):
New way to run a region by using helper M file below.
emacsrunregion.m
(emacsrunregion): New function that runs a region from a file in MTLAB.
(matlab-shell-error-location-expression):
Fix error expressions to handle directories w/ + in them.
(matlab-shell-scan-for-error-test):
New command for testing.
(matlab-shell-scan-for-error):
Strip out interactive bits.
errexamples.shell.m:
Fixed location of some of the errors.
Always start an emacsclient server.
(matlab-shell--get-emacsclient-command):
Create a server for matlab-shell's use independent of
any other emacsclient.
Patch from John Ciolfi.
Fix some of the gud toolbar buttons, and make edit cmd work better.
(server): New Require
(matlab-shell-mode): Revised gud bindings.
(matlab-shell--get-emacsclient-command): New
(gud-matlab-marker-filter): Use above.
Autoload cookie for `matlab-mode-determine-matlabroot'.
mlint.el:
More robust finding of mlint program.
(mlint-reset-program): If other tricks fail,
use matlabroot and find mlint that way.
Fix error and warning scraping and jumping.
Delete some obsolete text formatters.
(matlab-shell-mode): Re-enable comint filter function
`matlab-shell-render-errors-as-anchor'.
(matlab-txt-format-beg, matlab-txt-format-end): Delete.
(matlab-shell-render-html-txt-format): Delete
(gud-matlab-error-regexp): Deleted. Expressions are now in the below:
(matlab-shell-error-anchor-expression): New
(matlab-shell-error-location-expression): New
(matlab-shell-scan-for-error): New, uses above to find
errors, and return file and line number info.
(matlab-shell-render-errors-as-anchor): Use above.
Make input optional to simplify testing.
(matlab-shell-which-fcn): Fix preceeding comments.
This is now used by below.
(matlab-shell-mref-converters): New
(matlab-shell-mref-to-filename): New, use above.
Converts a file name (as scraped from MATLAB output)
into a file name emacs can use.
Will now ask MATLAB to get a file name if it can't figure it
out on it's own.
(matlab-find-other-window-file-line-column): Use above
instead of ad-hoc soln.
(matlab-shell-last-error): Use new `matlab-shell-scan-for-error'.
Revamp basic completion in the shell.
(company-mode,company-idle-delay): Quiet compiler.
(matlab-shell-mode-map): Remove random checks about `company-mode'.
Always provide the same bindings and control how to complete elsewhere.
Add comments and group keybindings.
Remove extras - only provide one complete.
(matlab-shell-tab): Convert to a switchyard.
Use `cond' to break up function into clear sections for each type of
completion we can do.
(matlab-shell-do-completion-light): New.
Uses `completion-in-region' to do all the work.
(matlab-shell-do-completion) New, all code that used to be in
`matlab-shell-tab'. To be used by older versions of Emacs.
Trim out old XEmacs logo thing.
Cleanup some completion stuff.
(matlab-shell-logo): Delete.
(matlab-shell-mode): Don't setup xemacs logo hack.
(matlab-shell-hack-logo): Delete
(matlab-shell-ask-MATLAB-for-completions): Move.
(matlab-shell-tab-company-available): Compute
default value inline.
(matlab-shell): Set companyidle delay to nil
to prevent random popups from appearing as you type.
(matlab-shell-window-exists-for-display-completion-flag): Delete.
(matlab-shell-get-completion-info): Update the doc
to conform to standards.
(matlab-display-completion-list): Moved to matlab-compat.el
(matlab-shell-tab): Cleanup old window display code to
use `display-buffer' instead.
(matlab-tab-hide-completions): Replace complexity with
`quit-buffer'.
(matlab-set-keymap-parent): New shim fcn.
(matlab-find-executible-directory): New fcn.
matlab-shell.el:
Use matlab-compat.el.
Always require comint, as this file won't load unless someone
is trying to create a shell.
(matlab-shell-font-lock-keywords): Refresh
to highlight startup text again.
(matlab-mode-determine-matlabroot): New.
(matlab-mode-install-path): Use above.
(matlab-mode-determine-mfile-path): Delete.
(matlab-shell-mode-map): Create during declaration,
including the menus.
(matlab-shell-mode): Don't make menu (see above)
(matlab-shell): Don't make keymap (see above)
semantic-matlab.el:
(semantic-matlab-root-directory): delete
(semantic-matlab-root-directory): Use
matlab-mode-determine-matlabroot instead of above.
(matlab-shell-region-command):
If the region we are going to run is only 1 line long, use the old
mechanism of just pasting the line onto the commandline.
New fcns needed by matlab-shell.el
(matlab-semantic-get-local-functions-for-script):
New. Returns fcns from a buffer. Works if semantic isn't enabled.
(matlab-semantic-tag-text): get text part of input TAG.
(semantic-default-matlab-setup): Add 'type tag class to list
of misc things, since we support them now.
matlab-shell.el:
(matlab-shell-extract-region-to-tmp-file): Use new fcns above.
Fix compiler warnings.
(matlab-shell-extract-region-to-tmp-file):
Fetch tags before doing the search for functions tags.
Give emacs a chance to flush MATLAB's output queue
before setting up prompt hook.
matlab-shell.el:
(gud-matlab-marker-regexp-plain-prompt): New regexp.
(matlab-shell-prompt-appears-hook): New hook (used below)
(gud-matlab-marker-filter): When returning output, if a prompt is
included, call the matlab-shell-prompt-appears-hook.
(matlab-shell-run-cell, matlab-shell-run-region-or-line): Move
(matlab-shell-run-region): Extract inline code to find 'command' to new fcn.
(matlab-shell-region-command): Function to extract code to run as cmd.
(matlab-shell-region->commandline): Copy from run-region as new fcn.
Fix up to better clean up blank lines, and excessive whitespace.
(matlab-shell-extract-region-to-tmp-file): NEW.
This is like region->commandline but puts content into a speicially named
m file. If any functions are needed from the script, pull those along.
(matlab-shell-cleanup-extracted-region): Delete files created by above.
Called from the new hook.
(matlab-shell-mode): Remove calls to dbhotlink from all gud-* commands.
(gud-matlab-dbhotlink): New state variable for when we are waiting
for output from hotlink command.
(gud-matlab-marker-filter): Stop checking for frames so much.
If no frame was found, and if we haven't asked for a frame, then
ask ML to run dbhotlink (from our local toolbox.)
If we are waiting for a hotlink, then search output for the
hotlink command, and strip it out of the process output.
Where we try to hold back output, restrict it to new state variable.
Where we always dump our output, restrict to prompts only.
(matlab-shell-tab): Don't use company mode if not active.
Fix misc compiler warnings.
dbhotlink.m:
If no input, determine current stack position and show that.
Also don't print stack # if in auto mode.
Move large chunks of matlab.el to matlab-complete.el,
matlab-shell.el, and matlab-topic.el.
Update existing .el files to require new files as needed.
Update Makefiles to no longer have Makefile check.
matlab.el: Settings updates:
(matlab-mode-version): Update to 4.0 (based on expectations of this change.)
(matlab-functions-have-end): set to t. Fix doc.
(matlab-functions-have-end-p): If guess, then guess, otherwise
base it on matlab-functions-have-end.
(matlab-fill-code): set to nil.
(matlab-keyword-list, matlab-block-end-pre-if): remove endfunction
(matlab-calculate-indentation): remove matlab-ltype-endfunction-comm.
matlab.el: code moving
(matlab-frame-init): moved earlier near keymaps.