Commit 1b22f645 authored by Dave Love's avatar Dave Love
Browse files

(add-log-current-defun): Use fortran-{beginning,end}-of-subprogram.

parent c095ddb9
...@@ -665,13 +665,13 @@ Has a preference of looking backwards." ...@@ -665,13 +665,13 @@ Has a preference of looking backwards."
;; Needs work for f90, but better than nothing. ;; Needs work for f90, but better than nothing.
(eq major-mode 'f90-mode)) (eq major-mode 'f90-mode))
;; must be inside function body for this to work ;; must be inside function body for this to work
(beginning-of-fortran-subprogram) (fortran-beginning-of-subprogram)
(let ((case-fold-search t)) ; case-insensitive (let ((case-fold-search t)) ; case-insensitive
;; search for fortran subprogram start ;; search for fortran subprogram start
(if (re-search-forward (if (re-search-forward
"^[ \t]*\\(program\\|subroutine\\|function\ "^[ \t]*\\(program\\|subroutine\\|function\
\\|[ \ta-z0-9*()]*[ \t]+function\\|\\(block[ \t]*data\\)\\)" \\|[ \ta-z0-9*()]*[ \t]+function\\|\\(block[ \t]*data\\)\\)"
(save-excursion (end-of-fortran-subprogram) (save-excursion (fortran-end-of-subprogram)
(point)) (point))
t) t)
(or (match-string 2) (or (match-string 2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment