Commit graph

548 commits

Author SHA1 Message Date
Eric Ludlam
968f46fbd2 tests/testeeval.m:
Add new case for 'noend' - where no </EMACSCAP> is sent.
Lets you test C-c C-c binding, to make sure there is an escape hatch.
2019-12-20 22:22:20 -05:00
Eric Ludlam
852544094b matlab-shell.el:
(matlab-shell-mode-map): Add C-c C-c binding to matlab-shell-interrupt-subjob.
(matlab-shell-flush-accumulation-buffer): New state variable.
(matlab-shell-wrapper-filter): If above variable is non nil, flush
the accumulation buffer as if there were no emacscap tags.
(matlab-shell-interrupt-subjob): New command.
Sets state to flush accumulation buffer, and also sends interrupt signal.
2019-12-20 22:14:52 -05:00
Eric Ludlam
db56941251 tests/mstest.el:
(mstest-capture): Accomodate new name for Help buffer.
2019-12-20 21:28:10 -05:00
Eric Ludlam
ddbe294a7a toolbox/help.m:
Add recursion detection.  This can occur if CWD is where this help file is.
Wrap call to help in try/catch so we can post the end emacscap tag.
2019-12-20 21:26:40 -05:00
Eric Ludlam
ba3e1bb3ca matlab-shell.el:
(matlab-shell-accumulator): Make buffer local.
(matlab-shell-process-capture-text):
MATLAB Help buffers now can appear as prefix, not whole buff name.
Detect those.
Improve display-buffer so we can re-use windows.
2019-12-20 21:22:20 -05:00
Eric Ludlam
7e4a87de3e toolbox/dbhotlink.m:
Also call Breakpoints to send updated breakpoints.
Wrap stack and breakpoints in (progn ...)

toolbox/+emacs/@Breakpoints/Breakpoints.m:
(updateString): New, extracted from updateEmacs.
If show=false, and no changes, send no refresh command.
(updateEmacs): use above.
(updateForHotLinks): New, disp the commands only.

toolbox/+emacs/@Stack/Stack.m
(updateForHotLinks): Display nothing of there were no changes.
2019-12-19 17:12:18 -05:00
Eric Ludlam
6d20f0f89f matlab-shell.el:
(matlab-shell-run-region-cmd): Delete, replace with...
(matlab-shell-internal-emacsrunregion): New variable specifies
what MATLAB command to use to run a region.
(matlab-shell-run-region-command): Renamed to ...
(matlab-shell-run-region-function): is now a lisp function symbol
to use to run the region, but uses the same text tags.
Cross ref the above variables.
(matlab-shell-region-command): Use new variable name from above.
If not 'auto' then just 'funcall' the region function.
(matlab-shell-run-region-internal): Renamed to ...
(matlab-shell-region->internal): New name.
Use new internal-emacsrunregion variable.
(matlab-shell-extract-region-to-tmp-file): Rename to ...
(matlab-shell-region->script): new name.
2019-12-19 16:36:22 -05:00
Eric Ludlam
65da8f15fb matlab-shell-gud.el:
(gud-matlab-tool-bar-map): Remove impl for default value.
(matlab-shell-mode-gud-enable-bindings): Init matlab frame,
then init `gud-matlab-tool-bar-map'.
2019-12-19 15:21:15 -05:00
Eric Ludlam
d4cf28da08 matlab-shell.el:
(matlab-shell-capture-text): Deleted.
(matlab-shell): Remove ref to above.
(matlab-shell-wrapper-filter): Prevent text between <EMACSCAP> from
being displayed into the comint buffer.  Instead, dispatch to below.
(matlab-shell-process-capture-text): New.
Process text string that is expected to have entire content
between <EMACSCAP> tokens.  Replaces `emacs-shell-capture-text'.
2019-12-19 07:05:03 -05:00
Eric Ludlam
da7fcb9fbf toolbox/emacscd.m:
Add trailing slash for default-directory, and comment about why.
2019-12-18 14:16:17 -05:00
Eric Ludlam
e598ebfa46 matlab-shell-gud.el:
Fix misc typos across the file.
2019-12-18 14:14:26 -05:00
Eric Ludlam
8ef81d040a matlab-shell.el:
Fix misc typos across the file.
(matlab-shell-sync-buffer-directory): New command.
(matlab-frame-init, matlab-shell-mode-map): Add bindings for above.
2019-12-18 14:09:22 -05:00
Eric Ludlam
5853edf895 matlab-shell-gud.el:
(gud-matlab-tool-bar-map): Add show stack and breakpoints.
Remove up/down.
Pull buttons from matlab-mode-map, not gud-minor-mode-map.
(matlab-shell-mode-gud-enable-bindings):
Bind stop-subjob to C-q
Finish is now dbstep out.
(matlab-shell-gud-minor-mode-map):
q now bound to stop-subjob.
2019-12-17 21:19:02 -05:00
Eric Ludlam
e17b123388 matlab.el:
(matlab-frame-init):
Add Finish function (dbstep out)
Quit is now dbquit (stop subjob)
2019-12-17 21:17:08 -05:00
Eric Ludlam
0f8e50a0c6 matlab-shell-gud.el:
(matlab-at-fcn): Add %% to all commands.
2019-12-17 20:12:19 -05:00
Eric Ludlam
e8b218160c matlab.el:
(matlab-shell-version-scrape): Don't change match data.
2019-12-17 20:11:36 -05:00
Eric Ludlam
cbdb3bf821 matlab-shell.el:
(matlab-shell-history-ignore): New customizable variable.
(matlab-shell-version-scrape): Update version regex to include prerelease.
Add config for `comint-input-history-ignore' to ignore stuff
sent by Emacs to ML.
2019-12-17 20:04:38 -05:00
Eric Ludlam
8ac3cbf73b tests/metest.el:
(metest-comment-string-syntax-test):
Add block comment testing.
(met-sexptest-files): Remove indents.m, it had
not test points for sexp tests.

tests/stringtest.m:
Add a block comment and tests for detecting contents.
2019-12-17 17:57:56 -05:00
Eric Ludlam
88ca03ecc4 matlab.el:
(matlab-frame-init): Fix menu help from copy-paste issue.
2019-12-17 17:46:03 -05:00
Eric Ludlam
8ac0cf226d matlab-shell-gud.el:
(matlab-shell-mode-gud-enable-bindings): Update bindings.
Change remove breakpoint to be C-x.
Add ebstatus, ebstack on C-v, C-w.
(matlab-shell-gud-minor-mode-map): Update bindings.
change gud-remove to be x
Add SPC to be gud-step
show-stack is now w.
show breakpoints is now v.
show symbol value is now e
Remove e binding to "edit" - leave as C-x C-q only.
(define-minor-mode): Resort bindings in help to be
same as in MATLAB->Debug menu.
2019-12-17 17:40:44 -05:00
Eric Ludlam
693edabcdd matlab-maint.el:
(matlab-maint-run-tests): Compile w/ debug io
when menu flag is set.
2019-12-17 17:26:58 -05:00
Eric Ludlam
b284f9a8b5 matlab-shell.el:
(matlab-shell-version-scrape): Change where we remove ourselves from
comint-filter-functions to avoid any leftovers if there is an error.
(matlab-shell-capture-text): Fix error msg when evaluating forms.
Used wrong variable previously.
2019-12-17 17:26:25 -05:00
Eric Ludlam
dffc3eb660 matlab.el:
(matlab-frame-init): Update to text in debug menu.
2019-12-17 17:24:42 -05:00
Eric Ludlam
a8cb6c02a8 matlab-shell-gud.el:
(matlab-shell=gud-minor-mode): Fixup help to be same as MATLAB debug menu.
2019-12-16 20:27:31 -05:00
Eric Ludlam
d5d36c01dc matlab-shell-gud.el:
(matlab-shell-gud-menu): Delete

matlab.el:
(matlab-frame-init): Improve Debug menu.
Add exit gud debug mode.
Rename various items to be clearer.
Add list breakpoints and show stack.
2019-12-16 20:22:58 -05:00
Eric Ludlam
1b8414d946 matlab-shell.el:
(matlab-shell-capture-text): Move the evaluation of forms,
or the display of the help buffer outside the
outermost save-excursion.  This allows these commands to reposition
point in different buffers.
2019-12-16 19:30:08 -05:00
Uwe Brauer
804f4a86a7 Merge default into documentation
--HG--
branch : documentation
2019-12-16 21:33:36 +01:00
Eric Ludlam
cd70817b60 matlab-shell-gud.el:
(mlg-breakpoint): New slot: name.
(mlg-breakpooints::mlg-print): New method to print in a buffer.
(mlg-add-breakpoint): Add 'fcn' input - put in name slot.
(mlg-del-breakpoint): Add 'fcn' input - then ignore.  Needed to line up w/ add.
(mlg-refresh-breakpoint-buffer, mlg-show-breakpoints): New
Manage contents of a buffer listing all the breakpoints.
(mlg-breakpoint-mode-map, mlg-breakpoint-mode-syntax-table): New.
(mlg-breakpoint-mode): New mode.
(mlg-breakpoint-quit, mlg-breakpoint-next, mlg-breakpoint-prev)
(mlg-breakpoint-click, mlg-breakpoint-choose):
New commands for breakpoint mode.
(matlab-shell-gud-minor-mode-map): Add 'w' to show breakpoints.
(easy-menu-define): Add Show Breakpoints menu item.

toolbox/ebstatus.m:
Always show the breakpoint buffer in emacs when called.

toolbox/+emacs/@Breakpoints/Breakpoints.m:
(updateEmacs): Add show input arg.
This forces breakpoints to show.
If not showing, update breakpoint buffer.
2019-12-15 15:05:18 -05:00
Eric Ludlam
e10f2c763f matlab-shell-gud.el:
(matlab-gud-debug-tracker): Make sure point is @ end of buffer
before checking of the prompt type.
2019-12-15 11:17:43 -05:00
Eric Ludlam
00aae05870 matlab.el:
(matlab-set-comm-fill-prefix): For comments that indicated bullet lists
in mlx files, create specialized prefix.
(matlab-fill-paragraph): Include paragraph start that includes bullet list
from mlx files.
2019-12-14 21:51:29 -05:00
Eric Ludlam
6e2f2a844f matlab-shell.el:
(matlab-shell-startup-command): Use defcustom instead of
defvar.
(matlab-shell-run-region-cmd): New
(matlab-shell-run-region-internal): Use above for cmd instead
of hard coded value.
2019-12-14 21:17:18 -05:00
Eric Ludlam
42ae40f8e8 tests/indents.m:
Added tests to verify the above.
2019-12-14 19:45:50 -05:00
Eric Ludlam
0fc6f9414f matlab.el:
(matlab-prev-line-cont): Moved fcn next to the check for continuations.
Replace `matlab-prev-line' with snippet to move only 1 line, as blank
lines will cancel a continuation.
(matlab-lattr-cont): Ignore ellipsis when in strings.

tests/indents.m:
Added tests to verify the above.
2019-12-14 19:45:32 -05:00
Eric Ludlam
e46a324bc2 matlab-shell-gud.el:
(mlg-show-frame): Fix so if stack is 1 deep, it still shows
the stack.
2019-12-14 19:19:22 -05:00
Eric Ludlam
d9463827c4 toolbox/+emacs/@Stack/Stack.m:
(updateForHotLinks): don't post a new frame if
nothing has changed.
2019-12-14 19:12:30 -05:00
Eric Ludlam
aef2037284 matlab-shell-gud.el:
(gud-matlab-marker-filter): Remove old hotlink url output scanning.
Replace with evaluating forms sent from MATLAB.
When exiting debug mode, also find and close the stack window.
(mlg-set-stack-frame-via-gud): New, called from MATLAB.
(mlg-stack-quit): New for stack mode.  Replaces 'delete-window which
sometimes fails.
(matlab-shell-gud-minor-mode-map): Add 'v' binding to view stack frame
window.
(easy-menu-define): Add "Show Stack" menu item to show stack window.

toolbox/+emacs/@Stack/Stack.m:
Add `StackPending' and `FramePending' flags for when that part changes.
(captureStack): New method - uses what was in updateEmacs for computing
the part of the stack we will use.
(updateEmacs): Remove chunk, put in above.
Always post the request to show, as this is used from ebstack, and it should
always do something.
(updateForHotLinks): New method, called from dbhotlinks.
Sends over stack only if needed.
(stackEqual): Rename output arg to better indicate what it is.

toolbox/dbhotlink.m:
Remove most of the content.
Replace with use of EmacsStack object, using updateForHotLinks method.
2019-12-14 18:58:10 -05:00
Eric Ludlam
3330f03f3d tests/testeeval.m:
Add 'buffer' option which tests a long wait while outputting,
and that we successfully don't show the content until it finishes.
2019-12-14 18:46:54 -05:00
Eric Ludlam
e28a218328 matlab-shell.el:
(matlab-shell-capture-text): Improve error message
so text can be used with eval.
2019-12-14 18:46:02 -05:00
Eric Ludlam
550dd09df0 mlint.el:
Fix doc strings based on checkdoc.
2019-12-14 18:45:16 -05:00
Eric Ludlam
9ddd83f554 matlab-shell.el:
(matlab-shell-wrapper-filter): Try to hide EMACSCAP text
in case it takes a while to display.
2019-12-14 11:52:22 -05:00
Eric Ludlam
088a2a8181 Makefile
Add tests to dist.
2019-12-14 10:38:33 -05:00
Eric Ludlam
fe496763f3 Project.ede, Makefile:
Bring the tests directory into EDE.

mestest.el, mstest.el:
Fix byte compiler warnings.
2019-12-14 10:08:28 -05:00
Eric Ludlam
85d373314c matlab-shell.el:
(matlab-shell-render-errors-as-anchor): Move to end of buffer
before scanning for errors a new time.
2019-12-13 09:07:31 -05:00
Eric Ludlam
2e8905b59d matlab-shell.el:
(matlab-shell-scan-for-error): Some errors might
be indented, so don't underline the spaces in front.

tests/buggy.m:
Add example indented error.
2019-12-13 09:01:59 -05:00
Eric Ludlam
fb19b6bcc1 cedet-matlab.el, matlab-cgen.el, matlab-compat.el,
matlab-complete.el, matlab-maint.el, matlab-netshell.el,
matlab-publish.el, matlab-topic.el, semantic-matlab.el,
semanticdb-matlab.el, srecode-matlab.el:
Fix varous issues in doc strings and messages identified by `checkdoc'
command.
2019-12-12 22:36:55 -05:00
Eric Ludlam
f23a926bb2 matlab-shell-gud.el:
Fix varous issues in doc strings and messages identified by `checkdoc'
command.
2019-12-12 22:22:09 -05:00
Eric Ludlam
67f220ced2 matlab-shell.el:
Fix varous issues in doc strings and messages identified by `checkdoc'
command.
2019-12-12 22:18:55 -05:00
Eric Ludlam
3be85a13f4 matlab.el:
Fix varous issues in doc strings and messages identified by `checkdoc'
command.
2019-12-12 22:08:29 -05:00
Eric Ludlam
e620ab40a5 matlab-shell-gud.el:
(mlg-set-stack,mlg-refresh-stack-buffer,mlg-add-breakpoint):
Make compatible with Emacs 24.
2019-12-12 19:05:26 -05:00
Eric Ludlam
9646902e54 matlab-compat.el:
(matlab-find-emacsclient): Fix paren bug w/ cond statement.

matlab-netshell.el:
Declare functions from matlab-shell, nd matlab-shell-gud to quiet the
byte compiler.
2019-12-12 18:45:59 -05:00