]> git.eshelyaron.com Git - emacs.git/commitdiff
(add-log-current-defun): Fix previous fortran change.
authorRichard M. Stallman <rms@gnu.org>
Tue, 5 May 1998 04:09:14 +0000 (04:09 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 5 May 1998 04:09:14 +0000 (04:09 +0000)
lisp/add-log.el

index 9262d12112a92a812f9265df7960fc2c1a5a700e..b71257a015ae81dbf4e802c9e4290a131eda410f 100644 (file)
@@ -640,20 +640,20 @@ Has a preference of looking backwards."
                  (let ((case-fold-search t)) ; case-insensitive
                    ;; search for fortran subprogram start
                    (if (re-search-forward
-                        "^[ \t]*\\(program\\|subroutine\\|function\
+                        "^[ \t]*\\(program\\|subroutine\\|function\
 \\|[ \ta-z0-9*()]*[ \t]+function\\|\\(block[ \t]*data\\)\\)"
-                        (progn (end-of-fortran-subprogram)
-                               (point))
-                        t)
+                        (save-excursion (end-of-fortran-subprogram)
+                                        (point))
+                        t)
                        (or (match-string 2)
-                       (progn
-                         ;; move to EOL or before first left paren
-                         (if (re-search-forward "[(\n]" nil t)
+                           (progn
+                             ;; move to EOL or before first left paren
+                             (if (re-search-forward "[(\n]" nil t)
                                 (progn (backward-char)
-                                   (skip-chars-backward " \t"))
-                          (end-of-line))
-                        ;; Use the name preceding that.
-                         (buffer-substring (point)
+                                        (skip-chars-backward " \t"))
+                               (end-of-line))
+                             ;; Use the name preceding that.
+                             (buffer-substring (point)
                                               (progn (backward-sexp)
                                                      (point)))))
                     "main")))