changeset 21943:f702be237f91

(add-log-current-defun): Fix previous fortran change.
author Richard M. Stallman <rms@gnu.org>
date Tue, 05 May 1998 04:09:14 +0000
parents 301e6c47b67d
children 8e606f5208eb
files lisp/add-log.el
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/add-log.el	Tue May 05 03:29:49 1998 +0000
+++ b/lisp/add-log.el	Tue May 05 04:09:14 1998 +0000
@@ -640,20 +640,20 @@
                  (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")))