aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love1998-10-14 18:09:05 +0000
committerDave Love1998-10-14 18:09:05 +0000
commit46d4d7bffa7d7840432f1cda4e642be96992b781 (patch)
treeb9870ae7dd355c40b77ca583adb865c6a28ec112
parent8a52365ce8d2c9a0b2308fe7c769ad785eb1fa22 (diff)
downloademacs-46d4d7bffa7d7840432f1cda4e642be96992b781.tar.gz
emacs-46d4d7bffa7d7840432f1cda4e642be96992b781.zip
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.
-rw-r--r--lisp/progmodes/fortran.el24
1 files changed, 16 insertions, 8 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index c113020b1c6..cb811123c17 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -279,7 +279,7 @@ format style.")
279 (regexp-opt '("continue" "format" "end" "enddo" "if" "then" 279 (regexp-opt '("continue" "format" "end" "enddo" "if" "then"
280 "else" "endif" "elseif" "while" "inquire" "stop" 280 "else" "endif" "elseif" "while" "inquire" "stop"
281 "return" "include" "open" "close" "read" "write" 281 "return" "include" "open" "close" "read" "write"
282 "format" "print" "select" "case")))) 282 "format" "print" "select" "case" "cycle" "exit"))))
283 (fortran-logicals 283 (fortran-logicals
284 (eval-when-compile 284 (eval-when-compile
285 (regexp-opt '("and" "or" "not" "lt" "le" "eq" "ge" "gt" "ne" 285 (regexp-opt '("and" "or" "not" "lt" "le" "eq" "ge" "gt" "ne"
@@ -455,7 +455,7 @@ format style.")
455 ["Momentary 72-column window" fortran-window-create-momentarily t] 455 ["Momentary 72-column window" fortran-window-create-momentarily t]
456 "----" 456 "----"
457 ["Break Line at Point" fortran-split-line t] 457 ["Break Line at Point" fortran-split-line t]
458 ["Join Continuation Line" fortran-join-line t] 458 ["Join Line" fortran-join-line t]
459 ["Fill Statement/Comment" fill-paragraph t] 459 ["Fill Statement/Comment" fill-paragraph t]
460 "----" 460 "----"
461 ["Add imenu menu" 461 ["Add imenu menu"
@@ -829,13 +829,21 @@ See also `fortran-window-create'."
829 (delete-indentation) 829 (delete-indentation)
830 t))) 830 t)))
831 831
832(defun fortran-join-line () 832(defun fortran-join-line (arg)
833 "Join a continuation line to the previous one and re-indent." 833 "Join current line to the previous one and re-indent.
834 (interactive) 834With a prefix argument, repeat this operation that many times.
835If the prefix argument ARG is negative, join the next -ARG lines.
836Continuation lines are correctly handled."
837 (interactive "*p")
835 (save-excursion 838 (save-excursion
836 (beginning-of-line) 839 (when (> 0 arg)
837 (if (not (fortran-remove-continuation)) 840 (setq arg (- arg))
838 (error "Not a continuation line")) 841 (forward-line arg))
842 (while (not (zerop arg))
843 (beginning-of-line)
844 (or (fortran-remove-continuation)
845 (delete-indentation))
846 (setq arg (1- arg)))
839 (fortran-indent-line))) 847 (fortran-indent-line)))
840 848
841(defun fortran-numerical-continuation-char () 849(defun fortran-numerical-continuation-char ()