Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a9e2a7f2
Commit
a9e2a7f2
authored
Jun 05, 1993
by
Richard M. Stallman
Browse files
(add-log-current-defun): Handle Fortran.
parent
9bd67a37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
lisp/add-log.el
lisp/add-log.el
+19
-0
No files found.
lisp/add-log.el
View file @
a9e2a7f2
...
...
@@ -373,6 +373,25 @@ Has a preference of looking backwards."
(
if
(
re-search-backward
"^@node[ \t]+\\([^,]+\\),"
nil
t
)
(
buffer-substring
(
match-beginning
1
)
(
match-end
1
))))
((
eq
major-mode
'fortran-mode
)
;; must be inside function body for this to work
(
beginning-of-fortran-subprogram
)
(
let
((
case-fold-search
t
))
; case-insensitive
;; search for fortran subprogram start
(
if
(
re-search-forward
"
^[
\t]*\\
(
program\\|subroutine\\|
function
\
\\
|
[
\ta-z0-9*]*[
\t]+function\\
)
"
string nil t)
(progn
;; move to EOL or before first left paren
(if (re-search-forward "
[
(
\n]
" nil t)
(progn (forward-char -1)
(skip-chars-backward "
\t
"
))
(
end-of-line
))
;; Use the name preceding that.
(
buffer-substring
(
point
)
(
progn
(
forward-sexp
-1
)
(
point
)))))))
(
t
;; If all else fails, try heuristics
(
let
(
case-fold-search
)
...
...
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