Add FollowStack option that can be turned on/off.
When on, get the Stack object, and update the stack.
toolbox/+emacs/@Stack/Stack.m
Trim off all the timer cb parts of the stack to get to
where the user code really is in the case of EmacsServer.
Fix file names on Windows to have Emacs friendly slashes.
toolbox/+emacs/set.m
Add 'followstack' option.
Sets FollowStack prop on the Server.
(matlab-shell-emacsclient-command): Change default to use
output from `matlab-find-emacsclient'.
(matlab-shell--get-emacsclient-command):
Add docstring.
Added windows capability - adding internal quotes to match
up with the quotes added by ML on windows.
(matlab-mode-map): Remove M-q binding to matlab-fill-paragraph
(matlab-mode): Set fill-paragraph-function to mtlab-fill-paragraph.
Lets us use built-in paragraph filler w/ matlab specialization.
(matlab-shell-first-prompt-fcn): Call emacsinit with 'run'.
Emacsinit will now set the path and rehash.
Use emacs.set for setting up other features.
toolbox/emacsinit.m:
Take no inputs - need to be used via `run'.
Remove stuff now in toolbox/+emacs/set.m for setting up emacsclient.
Remove stuff related to inputs. Only create netshell if not in Emacs.
Enable dbstack display and navigation feature.
(mlg-stack-frame): New class.
(mlg-stack-frame::mlg-print): New method
(mlg-stack, mlg-frame): New variables.
(mlg-set-stack, mlg-set-stack-frame): New commands run from ML.
(mlg-show-frame, mlg-refresh-stack-buffer)
(mlg-show-stack): New commands to setup and display the stack.
(mlg-stack-mode-map, mlg-stack-mode-syntax-table): New
(mlg-stack-mode): New mode.
(mlg-stack-next, mlg-stack-prev, mlg-stack-click)
(mlg-stack-choose): New mode commands.
Modify the path to include this toolbox directory if not already on the path.
If not running inside emacs directly, init the netshell interface.
Initialize the emacs.Stack feature.
New compat macros for cl-defmethod, pulse, and font-lock stuff.
linemark.el, mlint.el, matlab-shell-gud.el, semanticdb-matlab.el:
Replace defmethod with cl-defmethod.
Replace call-next-method with cl-call-next-method.
linemark.el:
Also require matlab-compat.el
tests/Makefile:
Allow EMACS to be overridable
Enable debug commands via netshell.
(matlab-at-fcn): New macro, dispatch to netshell if active.
(matlab-gud-fcn): Revise doc, it was wrong.
Use matlab-at-fcn internally.
(matlab-shell-mode-gud-enable-bindings): Use matlab-at-fcn for
dbstop/dbclear.
(gud-matlab-tooltip-tips): Fix bug for events from the shell
buffer, which seem to generate events with a window that has no
buffer.
Support a netshell input.
When netshell is active, send breakpoints via the netshell connection.
Convert all disp commands to instead create a string
that can be sent via netshell.
(matlab-shell-error-anchor-expressions): Update to also deal with
output from dbup/down "workspace belonging to" flavor text.
(matlab-shell-render-errors-as-anchor): Trim file name string.
(matlab-shell-capture-text): Protect when running forms from MATLAB.
Add support for visible breakpoints.
(matlab-shell-mode-gud-enable-bindings): Use ebstop,ebclear instead
of dbstop,dbclear.
(mlg-breakpoint): New class.
(matlab-gud-visible-breakpoints): New variable.
(mlg-reset-breakpoints, mlg-add-breakpoints, mlg-del-breakpoint): New.
Manage list of breakpoints.
On first add, add matlab-mode-hook to activate breakpoints when a
new ML buffer is pulled into a buffer.
(mlg-breakpoint-face): New face.
(mlg-breakpoint::mlg-activate): New method.
Creates an overlay at the loction of the breakpoint.
(mlg-breakpoint::mlg-deactivate)
(mlg-breakpoint-activate-buffer-opened-hook): New
(mlg-breakpoint-flush-and-reactivate): New command for debugging.
(matlab-shell-gud-minor-mode): Fix bug - want to make-local-variable,
not make it buffer local.
New breakpoint tracking object. Keep track of breakpoints
and send Emacs only the deltas.
toolbox/emacsinit.m:
Initialize breakpoint tracker.
toolbox/ebstop.m, toolbox/ebclear.m, toolbox/ebstatus.m:
New wrappers for dbstop, dbclear, and dbstatus.
Calls the built-in, and then calls the breakpoint tracker
to tell emacs about any changes in breakpoints.
Refine some of the debugging environment.
(matlab-shell-mode-gud-enable-bindings): Remove extra /
from stop/clear commands.
Don't provide a print.
(matlab-shell-gud-minor-mode-map): Add C-xC-q binding
to disable the minor mode. (like e)
(matlab-shell-gud-menu): Change text for exiting the minor mode.
Add show symbol value option.
(define-minor-mode): Replace the gud toolbar with our own.
Disable toolbar with our mode.
matlab.el:
Re-enable debug mode if it is available.
(matlab-mode-map): Replace `toggle-read-only' with
a matlab version.
(matlab-toggle-read-only): New command.
If the debugger is active, turn on matlab-shell-gud-minor-mode.
Otherwise do read-only-mode.
Allow spaces in front of Error text.
Needed for Errors that are captured, and posted later indented.
(matlab-shell-error-anchor-expression):
Allow spaces in front of error anchor.
More electric block comment behaviors.
(matlab-mode-map): Bind { to electric block comment.
(matlab-electric-block-comment): Auto-reindent block
comment start. Useful when typing block comment after help
comments.
Add messages and highlighting for nested %{ and lonely %}.
Electric block comment behaviors.
(matlab-mode-map): Bind } to electric block comment.
(matlab-mode): Add setting to after-change-functions
to `matlab-change-function' for clearing parsing caches.
(matlab-backward-sexp): Add special block-comment handler.
Convert to use (cond ...) instead of if.
(matlab-forward-sexp): Add block-comment handler
(matlab-change-function): New after-change-function which
flushes the block-comment cache.
(matlab-ltype-block-comm-bounds, -lastcompute): Moved.
(matlab-indent-line): Deleted a line of dead code.
(matlab-calculate-indentation-1): block comment body
lines that start with % now line up with the % in the
block comment start %{.
Replace uses of (current-column) with (current-indentation)
where appropriate.
(matlab-electric-block-comment): Auto-reindent block
comment end.
Fany block comment indentation & performance changes.
When looking @ block comment indentation, discovered that
the block comment detector was called ALOT for indent of 1 line,
and then discovered beginning of command was also called a lot.
Added caching for block comment detection, and cut back on calls
to beginning of command.
(matlab-in-command-restriction): New
(matlab-with-current-command): New, uses above.
Create restriction by using matlab-beginning-of-command,
and be aware there is no need to re-restrict if we
detect we have recursed.
(matlab-valid-end-construct-p)
(matlab-lattr-block-close): Use above
(matlab-prev-line-cont): Extracted from matlab-beginning-of-command.
(matlab-beginning-of-command): Use above.
Call matlab-ltype-block-comm, if in block comment, go to
start of block comment. (new feature)
(matlab-ltype-comm-noblock): New, extracted from `matlab-ltype-comm'.
(matlab-ltype-comm): Use above.
Move block comments first, since sometimes they detect
as reg comments.
(matlab-ltype-help-comm): Change to return location of
function the help is for.
Use new ltype-comm-noblock to be faster.
(matlab-ltype-block-comm-bounds)
(matlab-ltype-block-comm-lastcompute): New caches.
(matlab-ltype-block-comm): Move body to matlab-ltype-block-comm-1.
This now handles caching, recycling old computations if
called more than once in same region.
Handles 'linebounds' input.
(matlab-ltype-block-comm-1): Fix bug where end of block comm
was always point-max.
Set bounds cache.
(matlab-ltype-block-comm-at-start): New
Use block comment cache.
(matlab-ltype-block-comm-at-end): New
Use block comment cache.
(matlab-ltype-continued-comm): Use ltype-comm-noblock.
(matlab-lattr-cont): Don't require % for comment after ...
(matlab-calculate-indentation-1):
Optimize finding beginning of defun by caching output
of matlab-ltype-help-comm.
Add new indentation parts for block comment start,end, and body.
For code lines don't use beginning-of-command, instead check
that prev line isn't a continuation.
For continuations, compute beginning of command, and use
for both sides of the condition-case.
(matlab-next-line-indentation):
Use `matlab-with-current-restriction' instead of using
beginning-of-command by itself.
Improve performance of processing massive error stacks.
(matlab-shell-in-process-filter): New state variable.
(matlab-shell-wrapper-filter): Bind above to t inside body of filter.
(matlab-shell-mref-which-fcn): Do not process file names if in a process filter.
Add tests for <EMACSCAP> tokens.
(mstest-run-all-tests): Add mstest-capture.
(mstest-completion): Fix expected value now that 'emacscd' is in toolbox.
(mstest-capture): New. Tests help and custom testeeval.m.
tests/testeeval.m
New. Test Emacs EVAL.
Uses <EMACSCAP> token with (eval) buffer to tell Emacs to set
a variable that mstest can check.