Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
845d331e
Commit
845d331e
authored
Oct 06, 2002
by
Glenn Morris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fortran-beginning-do): Ignore labelled DO loops altogether.
parent
f7d43438
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/progmodes/fortran.el
lisp/progmodes/fortran.el
+6
-5
No files found.
lisp/ChangeLog
View file @
845d331e
2002-10-06 Glenn Morris <gmorris@ast.cam.ac.uk>
* progmodes/fortran.el (fortran-beginning-do): Ignore labelled DO
loops.
2002-10-04 Markus Rost <rost@math.ohio-state.edu>
* vc.el (vc-default-show-log-entry): Fix typo.
...
...
lisp/progmodes/fortran.el
View file @
845d331e
...
...
@@ -1104,12 +1104,13 @@ Return point or nil."
(defun fortran-beginning-do ()
"Search backwards for first unmatched DO [WHILE].
Return point or nil."
(let ((case-fold-search t))
Return point or nil. Ignores labelled DO loops (ie DO 10 ... 10 CONTINUE)."
(let ((case-fold-search t)
(dostart-re "\\(\\(\\sw\\|\\s_\\
)
+:[
\t]*\\
)
?do[
\t]+[^0-9]
"))
(if (save-excursion
(beginning-of-line)
(skip-chars-forward "
\t0-9
")
(looking-at
"\\(\\(\\sw\\|\\s_\\
)
+:[
\t]*\\
)
?do[
\t]+
"
))
(looking-at
dostart-re
))
;; Sitting on one.
(match-beginning 0)
;; Search for one.
...
...
@@ -1121,9 +1122,9 @@ Return point or nil."
(not (and (looking-at fortran-end-prog-re)
(fortran-check-end-prog-re))))
(skip-chars-forward "
\t0-9
")
(cond ((looking-at
"
\\
(
\\
(
\\sw\\|\\s_\\)+:[ \t]*\\)?do[ \t]+")
(cond ((looking-at dostart-re)
(setq count (1- count)))
;; Note labelled loop ends not considered.
((looking-at "
end[
\t]*do\\b
")
(setq count (1+ count)))))
(and (= count 0)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment