aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2005-04-24 19:42:28 +0000
committerGlenn Morris2005-04-24 19:42:28 +0000
commitb78cbdf785eefe29c0917da8312f4ed54ae20c7d (patch)
treec1d4860c5b68063f4681bbd0e18350d7fbb724ed
parent2538808fd8b60753cad84b26092340695de4ce9b (diff)
downloademacs-b78cbdf785eefe29c0917da8312f4ed54ae20c7d.tar.gz
emacs-b78cbdf785eefe29c0917da8312f4ed54ae20c7d.zip
(f90-calculate-indent): Fix treatment of first statement in buffer
(broken by 2004-11-24 change).
-rw-r--r--lisp/progmodes/f90.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 14363e4dccf..eb6db05c159 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1109,9 +1109,15 @@ Does not check type and subprogram indentation."
1109 (let (icol cont (case-fold-search t) (pnt (point))) 1109 (let (icol cont (case-fold-search t) (pnt (point)))
1110 (save-excursion 1110 (save-excursion
1111 (if (not (f90-previous-statement)) 1111 (if (not (f90-previous-statement))
1112 ;; First statement in buffer. 1112 ;; If f90-previous-statement returns nil, we must have been
1113 ;; called from on or before the first line of the first statement.
1113 (setq icol (if (save-excursion 1114 (setq icol (if (save-excursion
1114 (f90-next-statement) 1115 ;; f90-previous-statement has moved us over
1116 ;; comment/blank lines, so we need to get
1117 ;; back to the first code statement.
1118 (when (looking-at "[ \t]*\\([!#]\\|$\\)")
1119 (f90-next-statement))
1120 (skip-chars-forward " \t0-9")
1115 (f90-looking-at-program-block-start)) 1121 (f90-looking-at-program-block-start))
1116 0 1122 0
1117 ;; No explicit PROGRAM start statement. 1123 ;; No explicit PROGRAM start statement.