Commit graph

8 commits

Author SHA1 Message Date
Eric Ludlam 3f239aaefb matlab-syntax.el:
(matlab--put-char-category): If at end of buffer, don't
put the text property there.
2021-03-13 10:45:54 -05:00
Eric Ludlam 023bbcf9f0 matlab-syntax.el:
(matlab--scan-line-bad-blockcomment)
(matlab--scan-line-for-ellipsis):
Remove narrowing to region and use search bound instead.
This should be faster.
(matlab--font-lock-syntactic-face):
Quote in all the faces to avoid compiler warning.
2021-03-12 20:07:33 -05:00
Eric Ludlam 7a3e1e872b matlab-syntax.el:
(matlab-up-list): Remove restrict option

matlab.el:
(matlab-lattr-array-cont): Remove restrict option.
2021-03-08 22:08:38 -05:00
Eric Ludlam a8229c28e0 matlab.el:
(matlab-beginning-of-command): Remove searching for function/block to
restrict motion to.  The search and restrict just slowed down ppss.
(matlab-end-of-command): Remove optional input.
Stop restriting array-cont query.
(matlab-semicolon-on-return, matlab-mode-vf-quiesce-buffer):
Don't pass input to `matlab-end-of-command'.

matlab-syntax.el:
(matlab-up-list): Use `matlab-beginning-of-string-or-comment'
instead of asking for the string or commment bounds.
The beginning is part of ppss, but full bounds includes the end.
2021-03-08 21:58:25 -05:00
Eric Ludlam 83db249b97 matlab.el:
(matlab-uniquify-list): Move to matlab-complete.el
matlab-syntax.el:
(matlb-beginning-of-string-or-comment): New nav function
matlab-complete.el:
(matlab-uniquify-list): Moved here from matlab.el
(matlab-find-block-comments): Delete
(matlab-file-basic-font-lock-keywords): Remove ref to above.
(matlab-up-string-or-comment, matlab-backward-up-string-or-comment):
Delete.
(matlab-lattr-block-close):
Replace use of matlab-backward-up-string-or-comment with
matlab-beginning-of-string-or-comment.
2021-03-07 14:09:41 -05:00
Eric Ludlam 8dafb13337 matlab-syntax.el
(matlab-up-list):
Replaced use of `up-list' when travelling backward.
Instead use `syntax-ppss' and the list of paren positions
to navigate upward while ignoring comments.
When travelling forward, use plain up-list with no
looping.
2021-03-07 11:20:51 -05:00
Eric Ludlam 6fe7a322d6 matlab-syntax.el:
(matlab-cursor-in-string-or-comment)
(matlab-cursor-in-comment, matlab-cursor-in-string):
Convert to use syntax-ppss directly.
2021-03-07 10:50:16 -05:00
Eric Ludlam 4baad2b86c matlab-syntax.el:
New file - manage syntax table, and utilities that use the
syntax table for parsing strings, comments, and lists.
2021-03-06 23:56:15 -05:00