1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-06 20:49:33 +00:00

1998-10-14 Dave Love <fx@gnu.org>

* progmodes/fortran.el (fortran-mode-map): Change "Join
	Continuation Line" to "Join Line".
	(font-lock-keywords-1): Add "cycle", "exit".

1998-10-14  Emilio Lopes  <Emilio.Lopes@Physik.TU-Muenchen.DE>

	* progmodes/fortran.el (fortran-join-line): Use
	`delete-indentation' instead of issuing an error message if not on
	a continuation line.  Provide for joining several lines using
	prefix arg.
This commit is contained in:
Dave Love 1998-10-14 18:09:05 +00:00
parent 8a52365ce8
commit 46d4d7bffa

View File

@ -279,7 +279,7 @@ format style.")
(regexp-opt '("continue" "format" "end" "enddo" "if" "then"
"else" "endif" "elseif" "while" "inquire" "stop"
"return" "include" "open" "close" "read" "write"
"format" "print" "select" "case"))))
"format" "print" "select" "case" "cycle" "exit"))))
(fortran-logicals
(eval-when-compile
(regexp-opt '("and" "or" "not" "lt" "le" "eq" "ge" "gt" "ne"
@ -455,7 +455,7 @@ format style.")
["Momentary 72-column window" fortran-window-create-momentarily t]
"----"
["Break Line at Point" fortran-split-line t]
["Join Continuation Line" fortran-join-line t]
["Join Line" fortran-join-line t]
["Fill Statement/Comment" fill-paragraph t]
"----"
["Add imenu menu"
@ -829,13 +829,21 @@ See also `fortran-window-create'."
(delete-indentation)
t)))
(defun fortran-join-line ()
"Join a continuation line to the previous one and re-indent."
(interactive)
(defun fortran-join-line (arg)
"Join current line to the previous one and re-indent.
With a prefix argument, repeat this operation that many times.
If the prefix argument ARG is negative, join the next -ARG lines.
Continuation lines are correctly handled."
(interactive "*p")
(save-excursion
(beginning-of-line)
(if (not (fortran-remove-continuation))
(error "Not a continuation line"))
(when (> 0 arg)
(setq arg (- arg))
(forward-line arg))
(while (not (zerop arg))
(beginning-of-line)
(or (fortran-remove-continuation)
(delete-indentation))
(setq arg (1- arg)))
(fortran-indent-line)))
(defun fortran-numerical-continuation-char ()