matlab-scan.el:
(matlab--scan-block-forward): When fcns have no end, and a new fcn block start is found and popped, also go to beginning of found keyword so next forward-sexp sees it and jumps over next fcn. matlab.el: (matlab-backward-sexp, matlab-forward-sexp): Change chars skipped over @ beginning to better represent what regular forward/backwar-sexp does.
This commit is contained in:
parent
b4f10db9b9
commit
a3dc83e1dc
2 changed files with 8 additions and 9 deletions
|
@ -947,7 +947,8 @@ Use STATE to stop/start block scanning partway through."
|
|||
;; b/c you can't have nested functions, but only if the thing we try to match
|
||||
;; it to is another fcn.
|
||||
;; This POP should result in empty state.
|
||||
(pop blockstate))
|
||||
(pop blockstate)
|
||||
(goto-char (match-beginning 1)))
|
||||
(t
|
||||
(push thiskeyword blockstate)))
|
||||
))
|
||||
|
@ -989,14 +990,12 @@ Use STATE to stop/start block scanning partway through."
|
|||
;; On end, push this keyword
|
||||
(push thiskeyword blockstate))
|
||||
((eq (car thiskeyword) 'mcos)
|
||||
(if (matlab--valid-mcos-keyword-point nil)
|
||||
(pop blockstate)
|
||||
;; else, just skip it
|
||||
(when (matlab--valid-mcos-keyword-point nil)
|
||||
(pop blockstate)
|
||||
))
|
||||
((eq (car thiskeyword) 'args)
|
||||
(if (matlab--valid-arguments-keyword-point nil)
|
||||
(pop blockstate)
|
||||
;; else, just skip it, not a keyword
|
||||
(when (matlab--valid-arguments-keyword-point nil)
|
||||
(pop blockstate)
|
||||
))
|
||||
(t
|
||||
(pop blockstate)))
|
||||
|
|
|
@ -1673,7 +1673,7 @@ This assumes that expressions do not cross \"function\" at the left margin."
|
|||
(returnme t)
|
||||
keyword)
|
||||
(save-excursion
|
||||
(skip-chars-backward " \t\n")
|
||||
(skip-syntax-backward " .><")
|
||||
(cond
|
||||
;; Auto end - Just go!
|
||||
(autoend
|
||||
|
@ -1728,7 +1728,7 @@ a valid context."
|
|||
(let (p keyword) ;; go to here if no error.
|
||||
(save-excursion ;; Don't move if there is an error
|
||||
;; skip over preceding whitespace
|
||||
(skip-chars-forward " \t\n;")
|
||||
(skip-syntax-forward " .><")
|
||||
(cond
|
||||
;; Auto start - just go!
|
||||
(autostart
|
||||
|
|
Loading…
Reference in a new issue