| Now, the second detail about 'end'. The emacs lisp file doesn't
| recognize 'end' except as the end of a conditional or loop. Therefore,
| it claims a mismatch and loses track of indentation. (I know zilch
| about Lisp.) Anyone familiar with Lisp know if this is an easy fix? Or
| might there be something tricky about it?
Yes, it is somewhat tricky to decide whether end is being used inside
an index expression. What rule would you use (need not be stated in
Lisp)? Once you've decided that, the fix is to either modify
octave-block-end-regexp appropriately, or, if the rule can't be stated
in a regexp, to replace occurrences of
(looking-at octave-block-end-regexp)
with the function that can determine whether we are looking at the end
of a block and that is not confused by other uses of "end".