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.
Allow MATLAB to tell Emacs what to do.
(matlab-shell-capture-text): After capture, if buffername has special value 'eval'
then read the forms, and evaluate them instead of pushing into a buffer.
Fix bugs calling matlab-shell-help-mode twice in the same buffer.
(view): Require this.
(matlab-shell-help-mode-map): Set parent keymap for this one.
(matlab-shell-help-mode-syntax-table): New
(matlab-shell-help-mode): Set our empty syntax table.
Fix bugs with block comments.
(matlab-font-lock-extend-region): After choosing new beg/end,
check if we changed anything. If not, return nil.
(matlab-find-block-comments): Fix bug if block comment starts @ beg of line.
If end wasn't found, return region that goes to point-max to show
how user needs to add an end.
(matlab-debug-block-comm): Debugging tool.
(matlab-shell-gud-minor-mode): Make buffers in this mode read only.
Restore read only state by asking file if it is writable.
Do not change read only state for buffers w/out files.
(matlab-help-map, matlab-frame-init):
Remove references to topic browsers.
matlab-shell.el:
(easy-menu-define, matlab-shell-mode):
Remove references to topic browsers.
(matlab-shell): Add capture text to prompt-appears hook.
(matlab-shell-capturetext-*-text): New regexp
(matlab-shell-capture-text): New filter fcn that captures
anything between start/end and shows in a buffer.
(matlab-shell-describe-command): Add -emacs flag when calling help.
matlab-topic.el:
Remove topic browsing mode.
(matlab-shell-topic-mode-hook, matlab-shell-topic-current-topic)
(matlab-shell-topic-browser, matlab-shell-topic-mode-menu)
(matlab-shell-topic-mode, matlab-shell-topic-mode-menu)
(matlab-shell-topic-browser-create-contents):
Delete
(matlab-shell-topic-click -> matlab-shell-help-click): rename
(matlab-shell-topic-choose -> matlab-shell-help-choose): rename
(matlab-shell-topic-mouse-highlight-subtopics ->
matlab-shell-help-mouse-highlight-subtopics): Rename
(matlab-shell-help-choose): downcase found text, always
use *-describe-command.
toolbox/help.m:
New function to shadow system help.
Wrap output of system help in capture text cookies.
(matlab-gud-fcn): New macro for controlling when gud commands are active.
(matlab-shell-mode-gud-enable-bindings): change gud commands to use
above macro.
Set gud-minor-mode to 'matlab
(gud-matlab-tool-bar-map): New.
(matlab-shell-mode-gud-enable-bindings): Disable gud toolbar.
(gud-matlab-debug-tracker): enable and disable gud toolbar only when K>> prompt is around.