Commit graph

480 commits

Author SHA1 Message Date
Eric Ludlam
ffa8d4c8f3 matlab-emacsclient.sh:
Change mode to be executible.
2020-05-22 21:45:34 -04:00
Eric Ludlam
4de27bf944 matlab-compat.el:
(matlab-string-trim): Check for subr-x existing.
If it exists, require and set this as alias.
If it doesn't exist, define our own impl.
2020-05-19 21:40:28 -04:00
Eric Ludlam
f953647884 mlint.el: Patch from John Ciolfi
Misc spelling fixes.
(mlint-program-selection-fcn): Improved doc.
(mlint-lm-entry-deprecated): Fixed name
(mlint-run): Check that mlint-program is executable.
(mlint-minor-mode): Improve how mlint program is discovered.
2020-05-15 01:35:41 -04:00
Eric Ludlam
8294034489 matlab.el (matlab-lattr-cont):
Improve regexp matching ellipsis and check for if it is in a string.
tests/indents.m:
Add test for ellipsis in a string by itself.
2020-05-15 01:23:26 -04:00
Eric Ludlam
1991f10012 Merge from master 2020-04-22 21:59:38 -04:00
Eric Ludlam
febfd769cf matlab.el
(matlab-mode): Use :after-hook for initializing mlint minor mode.
Stop running matlab-mode-hook - this is done by define-derived-mode.
(matlab-mode-init-mlint-if-needed): Helper for initializing
mlint-minor-mode.  Protect against starting twice, if user
initialized it in the matlab-mode-hook.
(mlint-minor-mode): forward declare.
2020-04-22 19:26:50 -04:00
Eric Ludlam
9089a2af6c toolbox/emacsnetshell.m:
Add fetch option to just return the server if there already is one, or empty.
Support calling this function with no argument after it is running, and doing a 'fetch'
instead of an init.

help.m:
Use 'fetch' of emacsnetshell to decide if we need to send cookies to Emacs.
Don't send those cookies with netshell - only if inside an Emacs buffer.
2020-04-22 18:19:09 -04:00
Eric Ludlam
fea089e220 matlab.el:
(matlab-block-comment-start-re, matlab-block-comment-end-re):
New regular expressions used to find the start/end of a block comment.
(matlab-ltype-block-comment-start, matlab-ltype-block-comment-end):
New predicates to check for block comment features.
(matlab-find-block-comments, matlab-ltype-block-comm-1):
Use new block comment expressions instead of hand-written regexps.
(matlab-ltype-block-comm-at-start, matlab-ltype-block-comm-at-end)
(matlab-electric-block-comment):
Use new block comment predicates.

indents.m:
Add some block comment indentation tests with valid and invalid block
comment starts.
2020-04-22 18:00:00 -04:00
Eric Ludlam
9eee3937ba matlab.el:
(matlab-keyword-list): Add `arguments' to list.
(matlab-class-font-lock-keywords): Add 'arguments' to regex where 'properties' are.
(matlab-mcos-regexp): Add `arguments' to expression.

tests/indents.el:
Add sample arguments block with indentation checks.
2020-02-24 10:42:10 -05:00
Uwe Brauer
e14d97df70 Merge sourceforge master into github master. 2020-02-13 10:30:00 +01:00
Uwe Brauer
81268f57b1 Merge the mac_init branch into master. Thanks Eric. 2020-02-13 10:23:40 +01:00
Eric Ludlam
593e84e4e0 tlc.el:
(tlc-mode-hook): New option.
(tlc-mode): Setup as derived mode.
Call tlc-mode-hook.
2020-02-12 19:57:21 -05:00
Eric Ludlam
dd121bcd84 matlab.el:
(matlab-indent-past-arg1-functions): Add 'notify'
mclass.m:
Add a call to 'notify' to test font locking and indent.
2020-02-11 16:17:47 -05:00
Eric Ludlam
10a0491f59 matlab.el:
(matlab-keyword-list, matlab-class-font-lock-keywords)
(matlab-mcos-regexp): Add 'events' keyword to be
supported the way 'properties' keyword is.
tests/mclass.m:
Add 'events' block with 2 events in it.
2020-02-10 15:58:35 -05:00
Eric Ludlam
fdadaa0cdb matlab.el, mlint.el, semantic-matlab.el,
tlc.el, linemark.el, company-matlab-shell.el:
Update Copyrights:
* Fix date ranges to be more reliable.
* Remove MathWorks as copyright holder.
2020-02-08 21:43:34 -05:00
Eric Ludlam
f9c32289db matlab-shell.el:
(matlab-shell-save-and-go): Use `matlab-shell-send-command' so that
it works with netshell as well as regular shell.
2020-02-08 21:42:19 -05:00
Eric Ludlam
e7d9a21400 matlab-compat.el:
(matlab-find-emacsclient):
Fix how emacsclient is found when cygwin is installed on windows.
2020-02-08 17:13:14 -05:00
Eric Ludlam
80763e48c3 matlab-netshell.el:
(matlab-netshell-execute-command): Whe enabling gud bindings, do
so in the netshell process buffer.  Protects local keybindings in
whatever the default buffer was from gud's calls to set-local-key.
2020-01-25 10:36:44 -05:00
Eric Ludlam
7607846643 Merge branch 'master' of ssh://git.code.sf.net/p/matlab-emacs/src into usage1 2020-01-25 10:34:33 -05:00
Uwe Brauer
b3057e8ca6 Apply patch provided by John Ciolfi
* matlab-compat.el (matlab-find-executable-directory): Apply patch
provided by John Ciolfi <ciolfi@mathworks.com>, thanks John.
2020-01-06 23:17:33 +01:00
Uwe Brauer
fac6d0b7ca Update pkg information for MELPA 2020-01-06 23:12:44 +01:00
Eric Ludlam
978c44e74b Patch from John Ciolfi for MAC support for matlab-shell.
matlab-compat.el:
(matlab-find-emacsclient):
Improve how emacsclient is found across platforms.
Add support for MACOS.

bin/matlab-emacsclient.sh:
New script.  For MAC, use this to use the correct parameters with emacsclient
when called from MATLAB.  See comments for details.

toolbox/+emacs/set.m:
For unix case, use environment variables to setup how MATLAB will call emacsclient
instead of using Java & Preferences.

toolbox/emacsinit.m:
Spelling and typo fixes.
2020-01-05 10:44:25 -05:00
Eric Ludlam
59e245e543 matlab-shell.el:
Add ability to specify which command save-and-go uses instead of current buffer.
Useful when multiple files contribute to a particular program you want to run.
(matlab-shell-save-and-go-command, matlab-shell-save-and-go-command-enabled):
New options
(matlab-shell-set-save-and-go-command): New command.
(matlab-shell-save-and-go): Check above new options.
If it has a value, check if it is safe to use tht command.
If not, do the default.
2019-12-27 18:15:25 -05:00
Eric Ludlam
a80cf60926 toolbox/Project.ede
Add new M files to the target.
2019-12-27 17:14:59 -05:00
Eric Ludlam
b5f51beaed matlab-shell.el:
(matlab-shell-save-and-go): When asked to cd to file directory,
make sure the shell is not in that directory before issuing CD command.
Use `emacscd' command, to make sure Emacs' matlab-shell buffer also
changes.
2019-12-27 17:13:49 -05:00
Uwe Brauer
79d01a3934 Merge the sourceforge master branch into the github master branch.
NEWS.org (News in 4.0): 290 Merge, documentation concerning new
        features, provided by John Ciolfi <ciolfi@mathworks.com>, thanks John.

2019-11-25  Uwe Brauer  <oub@mat.ucm.es>

NEWS.org (Changes and New Features in matlab-emacs): New file,
        add News for 4.0
2019-12-23 21:12:23 +01:00
Uwe Brauer
92a8dbfa7e Merge the modernize branch--> documentation and merge this into master.
NEWS.org (News in 4.0): 290 Merge, documentation concerning new
        features, provided by John Ciolfi <ciolfi@mathworks.com>, thanks John.

2019-11-25  Uwe Brauer  <oub@mat.ucm.es>

NEWS.org (Changes and New Features in matlab-emacs): New file,
        add News for 4.0
2019-12-23 21:07:10 +01:00
Uwe Brauer
260c09ebaa Add some comments about the compilation problem with the Xemacsen
--HG--
branch : documentation
2019-12-23 21:05:10 +01:00
Uwe Brauer
4cf3c26c33 Merge the modernize branch into the documentation branch.
--HG--
branch : documentation
2019-12-23 20:58:57 +01:00
Eric Ludlam
462c6d2a1e matlab-maint.el:
Setup to simplify which Emacs to compile with.
(matlab-maint-menu): Add "clean" and "pick emacs" items.
(matlab-maint-compile-opts, matlab-maint-compile-emacs): New options.
(matlab-maint-pick-emacs, matlab-maint-compile-clean): New commands.
(matlab-maint-compile-matlab-emacs): Use `matlab-maint-compile-emacs'
as the value to EMACS variable in compile call.

linemark.el:
Use find-file-hook (find-file-hooks is obsololete)

matlab-shell.el:
Setup declared fcn for `matlab-shell-help-mode'.

matlab.el:
(matlab-mode): Use write-contents-functions instead of
write-contents-hooks.
(gud-matlab-debug-active): Give forwrad declare a value of nil.

mlint.el:
Require 'font-lock' during compilation.
(mlint-clear-cross-function-variable-highlighting):
Extra checks for `font-lock-flush' before calling.
2019-12-22 17:01:38 -05:00
Eric Ludlam
5bfaf2dbb4 tests/mstest.el:
Add additional debugging tests, including for breakpoints buffer, and stack display.
(mstest-debugger): Add extra debugging testss.
(mstest-debugger-stacklist, mstest-debugger-breakpointlist):
New test helpers.
(mstest-debugger-breakpoint): Allow to test for multiple breakpoints by
looping over extended inputs list.
2019-12-21 18:04:05 -05:00
Eric Ludlam
448646f989 matlab.el
(matlab-frame-init): Menu biding for ebstack now calls gud-list-breakpoints.
matlab-shell-gud.el:
Replace all bindings around mlg-show-breakpoints, and replace with
gud-list-breakpoints.
2019-12-20 22:23:11 -05:00
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