(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.
Fix to work w/ newer eieio.
(initialize-instance, initialize-instance):
Use oref-default to get class values.
(mlint-clear-cross-function-variable-highlighting):
Use font-lock-flush to fix compiler warnings.
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.
(semantic-matlab-parse-oldstyle-class)
(semantic-matlab-find-oldstyle-classes): Comment out.
Need to delete later.
(semantic-matlab-parse-region): Stop using above.
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.
Move tempo tags var into matlab-cgen, along with all related keymaps.
In matlab-cgen, define the keymap as autoload so things load and
run seamlessly.
On cgen load, run hook on all matlab buffers.
(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.
(matlab-font-lock-extend-region): is now added to font-lok-extend-region-functions
and handles block comment bounds.
(matlab-ltype-block-comm): now returns the bounds of the block comment
the cursor is in. (It had to find them anyway, so now it returns them.)
(matlab-show-paren-or-block): Now does nothing if in a block comment.
(matlab-mode-vf-block-matches-forward): Also ignores hits in block comments.
tests/mpclass.m: Minor tweaks from testing.
Add `matlab-mode-vf-add-ends' to `matlab-mode-verify-fux-functions'.
New fix function calls `matlab-mode-vf-block-matches-forward' with ADDEND input.
When an unterminated block appears, if functions have ends, offer to
add an END at a reasonable spot.
Remove "Highlight matching blocks" menu customizations as it isn't used anymore
due to parens mode support.
the region is active.
Fix `matlab-indent-line' to better preserve cursor location in text. This
has the side-effect of making matlab-comment place the cursor in a better spot
when inserting a new trailing comment.
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.
matlab.el: String & Comment Font Lock Handling
(matlab-mode-syntax-table): Add " as puncutation.
(matlab-string-char-regexp): New
(matlab-string-start-regexp): Add "
(matlab-string-content-regexp, matlb-string-end-regexp)
(matlb-match-string-end-for-string)
(mtlab-font-lock-string-match-normal)
(matlab-font-lock-string-match-unterninated)
(matlab-font-lock-string-match-here)
(matlab-font-lock-comment-match, ): Deleted
(matlab-font-lock-string-start-regexp): New
(matlab-font-lock-string-and-comment-start-regexp): New
(matlab-font-lock-allstring-comment-match-normal): New
(matlab-test-allstring-comment-match): New interactive tester for
fontlocked strings and comments.
matlab.el Misc Font Lock improvements
(matlab-handle-simulink): Remove option. Always
highlight simulink keywords.
(matlab-keyword-list): Remove classdef - this is handled diretly.
(matlab-simulink-keywords, matlab-constants-keyword-list): New,
moved out of explicit font lock expression.
(matlab-font-lock-regexp-opt): New fcn used in place of
regepxp-opt to simplify font-lock keywords, and maintain
compatibility.
(matlab-font-lock-keywords): Replace old charvect and comment
matchers with new unified string and comment matcher.
Replace all calls to regexp-opt with matlab-font-lock-regexp-opt.
Replace hard-coded lists of keywords with call to *-regexp-opt.
(matlab-function-font-lock-keywords): New, derived from gaudy
keywords.
(matlab-class-attributes-list-re,matlab-class-font-lock-keywords): New
(matlab-gaudy-font-lock-keywords): Now built from function and
class keywords list.
(matlab-realy-guady-font-lock-keywords): Replace obsolete
font-lock-type-face.
Remove continuation expression (now handled in combined
string/comment highlighter).
Replace all calls to regexp-opt with matlab-font-lock-regexp-opt.
(matlab-mode): Add support for font-lock-multiline.
If show-paren-mode is available, use that instead of built-in
block highlighting.
(matlab-ispell-strings-region): Use new font lock matcher for strings.
(matlab-valid-end-construct-p): Don't modify match-data.
matlab.el Block and Comment navigation
(matlab-up-string-or-comment, matlab-backward-up-string-or-comment): New
(matlab-move-list-sexp-internal): New (only list like expressions)
(matlab-move-simple-sexp-backward-internal): New (call below)
(matlab-move-simple-sexp-internal): New, nav comments, strings, and
lists.
(matlab-backward-sexp): Nav simple-sexp (as above).
Fix bug with noerror version if there are stacks of incomplete ends.
(matlab-forward-sexp): Nav w/ simple-sexp (as above)
instead of using built-in forward-sexp when not navigating blocks.
(matlab-forward-sexp): Add 'autostart' optional input.
(matlab-lattr-block-close): Account for ends in comments and strings.
(matlab-show-cursor-context): New debug command for testing what is
under the cursor.
(matlab-cursor-comment-string-context): New detector fcn for strings and
comments.
(matlab-ursor-in-string-or-comment, matlab-cursor-in-comment)
(matlab-cursor-in-string): Delete impl, use above detector instead.
matlab.el: show-paren-mode support
(matlab-show-paren-or-block): Function called from show-paren-mode to
identify what to highlight. Use new navigation system to identify
matching parens and block keywords.
tests/metest.el: New set of Emacs tests.
tests/metest.sh: Shell script to run tests.
tests/strings.el, tests/expressions.m, tests/mclass.m: New MATLAB
files with various syntaxes and test tokens used to verify new behavior.
matlab-up-string-orocomment, and matlab-backward-up-string-or-comment - Return t if we moved.
matlab-move-list-sexp-internal - skip whitespace before moving, and do
special stuff we we start in a string or comment, but are at the beginning/end of it.
matlab-backward-sexp - fix some cases with 'noerror' feature.
matlab-lattr-block-close - Fix to skip over ends in comments, strings and other places
while still counting ends that are valid.
matlab-show-paren-or-block - Fix case when on end to ignore ends that are array indices,
and use 'noerro' intput to matlab-backward-sexp.
* Support special classdef syntaxes, including class name highlight,
class, property, and method block attribute highlighting, property
variable name highlighting and property variable data-type
highlighting.
* Create matlab mode specific version of regexp-opt so users can
customize keyword lists in any Emacs version.
* Converted the simulink symbols, and constant symbols (like pi) into
lists that can be configured.
Tweaks:
* Simulink symbols are always highlighted. Removed configuration
variable to disable.
* matlab-gaudy-font-lock-keywords is now built from 3 other variables,
making maintenance a little easier.
* set font-lock-multiline to 'undecided. This fixes block comments,
unreachable code, and enables property block var highlighting so
they work when editing inside the block.
* Added "autostart" option to matlab-forward-sexp to aid in font-locking
blocks. This will move until a block the cursor is in is exited.
Correctly highlights parens even when there are other parens in strings and comments.
In mode, init paren-mode with this fcn. Disable older block highlighter.
Remove elipsis highliter from gaudy font lock elements.
Add matlab-up-string-or-comment, and matlab-backward-up-string-or-comment.
Add matlab-move-list-sexp-internal for navigating lists
Add matlab-move-simple-sexp-internal for navigating simple sexp expressions like comments, strings, and lists.
Update matlab-backward-sexp and matlab-forward-sexp replace emacs sexp navigation with above simple-sexp naviation functions.
Update matlb-cursor-comment-string-context to also return bounds to be used for navigating strings and comments.