Mercurial > emacs
comparison lisp/progmodes/fortran.el @ 23463:ac51d834b81e
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.
author | Dave Love <fx@gnu.org> |
---|---|
date | Wed, 14 Oct 1998 18:09:05 +0000 |
parents | af0615edcba3 |
children | 6b2444d06348 |
comparison
equal
deleted
inserted
replaced
23462:aaad8461ff34 | 23463:ac51d834b81e |
---|---|
277 (fortran-keywords | 277 (fortran-keywords |
278 (eval-when-compile | 278 (eval-when-compile |
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" |
286 "true" "false"))))) | 286 "true" "false"))))) |
287 | 287 |
453 (enlarge-window-horizontally (- (frame-width) (window-width))) | 453 (enlarge-window-horizontally (- (frame-width) (window-width))) |
454 (< (window-width) (frame-width))] | 454 (< (window-width) (frame-width))] |
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" |
462 (progn (imenu-add-menubar-index) | 462 (progn (imenu-add-menubar-index) |
463 ;; Prod menu bar to update -- is this the right way? | 463 ;; Prod menu bar to update -- is this the right way? |
827 (if (looking-at "\\( [^ 0\n]\\|\t[1-9]\\|&\\)") | 827 (if (looking-at "\\( [^ 0\n]\\|\t[1-9]\\|&\\)") |
828 (progn (replace-match "") | 828 (progn (replace-match "") |
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) | 834 With a prefix argument, repeat this operation that many times. |
835 If the prefix argument ARG is negative, join the next -ARG lines. | |
836 Continuation 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 () |
842 "Return a digit for tab-digit style of continuation lines. | 850 "Return a digit for tab-digit style of continuation lines. |
843 If, previous line is a tab-digit continuation line, returns that digit | 851 If, previous line is a tab-digit continuation line, returns that digit |