]> code.delx.au - gnu-emacs/commit
* lisp/progmodes/octave.el: Use grammar more; Handle enumeration fun
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 29 Sep 2015 19:13:44 +0000 (15:13 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 29 Sep 2015 19:13:44 +0000 (15:13 -0400)
commit90a6f8d0741eb5391c204f059c845c361e615b49
tree30446e80abf227e60bc319a3c63bf79b260fc3d7
parent1fea2f3b743da1db666be7ce34904b74319d3f83
* lisp/progmodes/octave.el: Use grammar more; Handle enumeration fun

Remove redundant :group keyword args.
(octave-begin-keywords, octave-else-keywords, octave-end-keywords):
Remove variables.
(octave-operator-table, octave-smie-bnf-table): Use let-when-compile to
turn them into compile-time variables.
Auto-generate the "foo ... end" rules from the "foo ... endfoo" rules.
Add rules for break, continue, return, global, and persistent.
Refine the rule for "until".
(octave-smie--funcall-p, octave-smie--end-index-p)
(octave-smie--in-parens-p): New functions.
(octave-smie-backward-token, octave-smie-forward-token): Use them to
distinguish the "enumeration" function and the "end" index from
their corresponding keywords.
(octave--block-offset-keywords): New constant.
(octave-smie-rules): Use it.  Adjust rules for new global/persistent parsing.
(octave-reserved-words): Redefine using octave-smie-grammar.
(octave-font-lock-keywords): Use octave-smie--funcall-p and
octave-smie--end-index-p.
lisp/progmodes/octave.el
test/indent/octave.m