Mercurial > hg > octave-lyh
changeset 1637:edfc235ced97
[project @ 1995-11-28 03:53:22 by jwe]
author | jwe |
---|---|
date | Tue, 28 Nov 1995 03:53:22 +0000 |
parents | 21fe2afb3692 |
children | 254482b2e43e |
files | emacs/octave.el |
diffstat | 1 files changed, 23 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/emacs/octave.el +++ b/emacs/octave.el @@ -763,42 +763,39 @@ (have-tc 0)) (save-excursion (beginning-of-line) - (while (< (point) (save-excursion (end-of-line) (point))) + (while (< (point) (octave-point 'eol)) (cond ((and (looking-at "\\bif\\b") (not (octave-is-in-string-p (point)))) - (progn - (setq icol (+ icol octave-stmt-indent)) - (setq have-if (+ have-if 1)))) + (setq icol (+ icol octave-stmt-indent) + have-if (+ have-if 1))) ((and (looking-at "\\btry\\b") (not (octave-is-in-string-p (point)))) - (progn - (setq icol (+ icol octave-stmt-indent)) - (setq have-tc (+ have-tc 1)))) + (setq icol (+ icol octave-stmt-indent) + have-tc (+ have-tc 1))) ((and (looking-at "\\bunwind_protect\\b") (not (octave-is-in-string-p (point)))) - (progn - (setq icol (+ icol octave-stmt-indent)) - (setq have-uwp (+ have-uwp 1)))) + (setq icol (+ icol octave-stmt-indent) + have-uwp (+ have-uwp 1))) ((and (looking-at "\\bcatch\\b") (not (octave-is-in-string-p (point)))) + (if (eq have-tc 0) + (setq icol (+ icol (* xelse octave-stmt-indent))))) + ((and (looking-at "\\b\\(else\\|elseif\\)\\b") + (not (octave-is-in-string-p (point)))) + (if (eq have-if 0) + (setq icol (+ icol (* xelse octave-stmt-indent))))) + ((and (looking-at "\\bunwind_protect_cleanup\\b") + (not (octave-is-in-string-p (point)))) + (if (eq have-uwp 0) + (setq icol (+ icol (* xelse octave-stmt-indent))))) + ((and (looking-at "\\bend") + (not (octave-is-in-string-p (point)))) (progn - (if (eq have-tc 0) - (setq icol (+ icol (* xelse octave-stmt-indent)))))) - ((and (looking-at "\\b\\(else\\|elseif\\)\\b") - (not (octave-is-in-string-p (point)))) - (progn - (if (eq have-if 0) - (setq icol (+ icol (* xelse octave-stmt-indent)))))) - ((and (looking-at "\\bunwind_protect_cleanup\\b") - (not (octave-is-in-string-p (point)))) - (progn - (if (eq have-uwp 0) - (setq icol (+ icol (* xelse octave-stmt-indent)))))) - ((and (looking-at "\\bend") - (not (octave-is-in-string-p (point)))) - (progn - (setq icol (- icol (* xend octave-stmt-indent))) + (if (> xend 0) + (setq icol (- icol (* xend octave-stmt-indent))) + (if (> icol 0) + (setq icol (- icol octave-stmt-indent)))) (cond ((and (> have-if 0) (looking-at "\\bendif\\b")) (setq have-if (- have-if 1)))