Commit Graph

30 Commits

Author SHA1 Message Date
Uwe Brauer 9c03ebf876 Update to GPL3+ (see the ChangeLog file for details, files in test directory left out)
* cedet-matlab.el: update to GPL3+

* company-matlab-shell.el: ditto

* company-matlab-shell.el: ditto

* dl_emacs_support.m: ditto

* linemark.el: ditto

* matlab-publish.el: ditto

* semanticdb-matlab.el: ditto

* semantic-matlab.el: Ditto

* matlab.el: ditto

* mlint.el: Ditto
2023-07-12 18:55:41 +02:00
John Ciolfi 4cf540990f mlint: update mlint-platform for mac 2023-01-20 14:38:46 -05:00
Eric Ludlam 7dae6d8514 mlint.el:
(mlint-error-id-fix-alist): Add MSNU as delete-focus auto-fix.
(mlint-lm-delete-focus:: mlint-fix-entry): Also delete horizontal space if at eol.
2021-04-22 15:07:10 -04:00
Eric Ludlam 194f9a9868 mlint.el:
(mlint-error-id-fix-alist):
Add MCSCC for bad constructor name to be auto fixable.
(mlint-lm-function-name::initialize-instance):
Add matcher for MCSCC warnings.
2021-04-17 10:38:22 -04:00
Eric Ludlam 94e3625d5b matlab.el:
(matlab-hg-primitives-list): Fix typo of a command name.
(matlab-comment-on-line): Fix this fcn to do what the doc says.

mlint.el:
(mlint-mark-ok): Separate the 2 cases of existing comment or not and
do each with special code.  Make sure the OK is put in the right
place.
2021-04-15 13:24:51 -04:00
Eric Ludlam ed4dbaf02e mlint.el:
(mlint-lm-replace-focus::initialize-instance)
(mlint-lm-function-name::initialize-instance)
(mlint-lm-entry-deprecated::initialize-instance):
Quote in the class name when passed to oref-default to silence warning.

semanticdb-matlab.el:
(semanticdb-project-system-databases)
(semanticdb-project-database-matlab::semanticdb-get-database-tables)
Use 'make-instance' to create instances of classes.
2021-03-30 20:37:04 -04:00
Eric Ludlam 67eb90e872 matlab-scan.el:
(matlab-line-declaration-p): Fix doc.
(matlab-line-first-word-text): New.

matlab.el:
(matlab-defun-regex): DELETED.
(matlab-guess-script-type): Replace use of matlab-defun-regex
with new api style navigation.
(matlab-guess-function-indentation): New way to guess
if a file should have indentation in function body.
(matlab-really-gaudy-font-lock-keywords): for tranpose,
use builtin-face like other operators.
(matlab-mode): When matlab-indent-function-body is 'guess
use new function above.
(matlab-find-prev-code-line, matlab-find-prev-line)
(matlab-prev-line, matlab-valid-end-construct-p): DELETED.
(matlab-mode-vf-block-matches-backward): DELETED

mlint.el:
(mlint-fix-entry): Use new api instead of
matlab-find-prev-code-line.

tests/metest.el:
In end detect test, turn `matlab-indent-function-body' to 'guess.
In test, also validate what the indent value is.
Put value for indent-function-body back to mw standard when done.

tests/empty.m, tests/mclass.m, tests/mfuncends.m
tests/mfuncnoends.m, tests/mfuncnoendblock.m:
Add indent exptect value to file

tests/mfuncnoendindent.m:
New file for testing endless function that should be indented.
2021-03-26 21:05:11 -04:00
Eric Ludlam 204fd79f1b matlab.el:
(matlab-valid-end-construct-p): an 'end' after a . is a field,
and not a valid block end.
(matlab-cursor-on-valid-block-start): any block after a . is a field,
and not a valid block start.

mlint.el:
(mlint-lm-missing-end::mlint-fix-entry): Fix too many close )

tests/blocks.m:
Add struct_stuff method to verify not indenting anything after a .

tests/stringtest.m:
Add an invalid block comment (all on one line) with test markers in it.
2021-03-05 16:59:06 -05:00
Eric Ludlam a8a7b7e73c mlint.el:
(mlint-error-id-fix-alist): Add ENDCT support.
(mlint-lm-missing-end::mlint-fix-entry):
Add support for adding end to functions without ends.
2021-03-05 16:42:43 -05:00
Eric Ludlam 02e9ea0a71 mlint.el:
Add autofix routines for missing ends, and missmatched file/class names.
(mlint-error-id-fix-alist): Add ENDCT2, FNDEF, and MCFIL support.
(mlint-lm-entry::mlint-fix-entry, mlint-lm-*::initialize-instance):
Fix all occurances of :AFTER with :after.
(mlint-lm-function-name): New class.
(mlint-lm-function-name::initialize-instance): New.
(mlint-lm-missing-end): New class.
(mlint-lm-missing-end::mlint-fix-entry): New.
2021-03-04 20:13:31 -05: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 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 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 550dd09df0 mlint.el:
Fix doc strings based on checkdoc.
2019-12-14 18:45:16 -05:00
Eric Ludlam 9bca22a465 matlab-compat.el:
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
2019-12-08 13:08:43 -05:00
Eric Ludlam cb10deea2c matlab-shell.el:
Autoload cookie for `matlab-mode-determine-matlabroot'.
mlint.el:
More robust finding of mlint program.
(mlint-reset-program): If other tricks fail,
use matlabroot and find mlint that way.
2019-11-17 16:19:42 -05:00
Eric Ludlam 1db3f203be mlint.el:
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.
2019-11-14 19:58:06 -05:00
Eric Ludlam 9eaf9e7752 Overview:
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.
2019-11-08 20:49:50 -05:00
John Ciolfi be1b68bd03 fix tab completiong, m-file debugging, and emacs warnings
See ChangeLog for details.
2017-12-05 14:08:53 -05:00
zappo d6f9c18ec0 (mlint-minor-mode): Remove make-local-hook for Emacs 24. 2014-03-07 23:22:24 +00:00
zappo fd7850d401 (mlint-platform): Get smarter about returning the kind of MAC and WIN supported.
(mlint-minor-mode): Don't disable verify on save since there is still useful stuff there.
2010-10-20 20:29:37 +00:00
zappo b2c6eafdf3 (mlint-run): Fix case where mlint-program was buffer local. 2010-07-29 15:13:13 +00:00
zappo d7fd94c38d (mlint-program-selection-fcn): New option.
(mlint-minor-mode): Use above to select an mlint program.
2010-07-28 12:33:04 +00:00
zappo b3876311b8 (mlint-minor-mode): Add autoload cookie. 2009-08-21 18:28:52 +00:00
zappo 4467172b1a (mlint-platform): Use string-match to determine 64 bit linux-ness.
(mlint-flags): Remove -fix until I get around to supporting it.
2008-09-02 13:06:24 +00:00
zappo fcfc67e5be (mlint-symtab-info): New variable.
(mlint-run):  Init symtab local var.
Fixed symbol table parsing to work with newer mlint.
2008-08-01 13:10:11 +00:00
zappo b3adcb8b29 (mlint-calculate-cyclic-complexity-flag): New flag.
(mlint-flags): Add -fix
(mlint-run): Use cyclic-complexity flag.
2008-05-19 19:02:19 +00:00
zappo c2688ee9eb (mlint-clear-warnings, mlint-clear-cross-function-variable-highlighting):
Make font-lock optional.
2007-03-06 18:24:53 +00:00
zappo f11e70fa14 (mlint-output-regex): Support the changed mlint output syntax
(mlint-symtab-line-regexp): Support changed mlint table output syntax
(mlint-warning-code-alist): Obsolete
(mlint-error-fix-alist): Obsolete
(mlint-error-id-fix-alist): New version of the old error-fix-alist.
(mlint-run): Add the "-edit" flag when highlighting crossfunction variables.
Updated parsing of the mlint table for highlighting cross-function variables.
Updated mechanism for highlighting the cross-function variables.
(mlint-lm-entry): Update warningid doc.
(mlint-warning->class, mlint-warningid->class): Name change.  Use new table of warning ids
instead of parsing warning strings.
(linemark-new-entry): Use warning id, not warning string for class determination.
(mlint-lm-replace-focus): new-text is no longer class allocated.
(mlint-lm-entry-depricated): New class rule.
(mlint-lm-entry-isstr, mlint-lm-entry-setstr): Deleted.
(mlint-lm-eval->trycatch): Commented out.  Not provided by mlint, but it
is cool and could be resurrected.
(mlint-highlight): Can't provide warningcode anymore.
(mlint-clear-cross-function-variable-overlays): Renamed to
(mlint-clear-nested-function-info-overlays): updated w/ more info.
(mlint-clear-cross-function-variable-highlighting)
(mlint-minor-mode): Use new clear function for nested function info.
2006-10-04 19:52:43 +00:00
zappo 769e3a0493 *** empty log message *** 2005-12-01 19:08:16 +00:00