aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/add-log.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 22feb7d2257..9c1be0e4536 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -373,6 +373,25 @@ Has a preference of looking backwards."
373 (if (re-search-backward "^@node[ \t]+\\([^,]+\\)," nil t) 373 (if (re-search-backward "^@node[ \t]+\\([^,]+\\)," nil t)
374 (buffer-substring (match-beginning 1) 374 (buffer-substring (match-beginning 1)
375 (match-end 1)))) 375 (match-end 1))))
376 ((eq major-mode 'fortran-mode)
377 ;; must be inside function body for this to work
378 (beginning-of-fortran-subprogram)
379 (let ((case-fold-search t)) ; case-insensitive
380 ;; search for fortran subprogram start
381 (if (re-search-forward
382 "^[ \t]*\\(program\\|subroutine\\|function\
383\\|[ \ta-z0-9*]*[ \t]+function\\)"
384 string nil t)
385 (progn
386 ;; move to EOL or before first left paren
387 (if (re-search-forward "[(\n]" nil t)
388 (progn (forward-char -1)
389 (skip-chars-backward " \t"))
390 (end-of-line))
391 ;; Use the name preceding that.
392 (buffer-substring (point)
393 (progn (forward-sexp -1)
394 (point)))))))
376 (t 395 (t
377 ;; If all else fails, try heuristics 396 ;; If all else fails, try heuristics
378 (let (case-fold-search) 397 (let (case-fold-search)