diff options
| author | Richard M. Stallman | 1995-08-05 01:02:10 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-08-05 01:02:10 +0000 |
| commit | 4254fe58456d2e1b9e9d8746ca802efc53ef2dad (patch) | |
| tree | bf82efa2d3250086dbd0f23077042af9f15c1f64 | |
| parent | 0d777288c38c561590fd2a5b46771e35646832ad (diff) | |
| download | emacs-4254fe58456d2e1b9e9d8746ca802efc53ef2dad.tar.gz emacs-4254fe58456d2e1b9e9d8746ca802efc53ef2dad.zip | |
(fortran-auto-fill-mode, fortran-do-auto-fill, fortran-fill):
Invoke auto filling only when past fill-column.
| -rw-r--r-- | lisp/progmodes/fortran.el | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index a0a4db58551..8f7d645a3bf 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: Michael D. Prange <prange@erl.mit.edu> | 5 | ;; Author: Michael D. Prange <prange@erl.mit.edu> |
| 6 | ;; Maintainer: bug-fortran-mode@erl.mit.edu | 6 | ;; Maintainer: bug-fortran-mode@erl.mit.edu |
| 7 | ;; Version 1.30.5.1 (Sept 16, 1994) | 7 | ;; Version 1.30.6 (July 27, 1995) |
| 8 | ;; Keywords: languages | 8 | ;; Keywords: languages |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | ;;; Bugs to bug-fortran-mode@erl.mit.edu | 47 | ;;; Bugs to bug-fortran-mode@erl.mit.edu |
| 48 | 48 | ||
| 49 | (defconst fortran-mode-version "version 1.30.5.1") | 49 | (defconst fortran-mode-version "version 1.30.6") |
| 50 | 50 | ||
| 51 | ;;; Code: | 51 | ;;; Code: |
| 52 | 52 | ||
| @@ -160,7 +160,7 @@ This variable used in TAB format mode.") | |||
| 160 | style.") | 160 | style.") |
| 161 | 161 | ||
| 162 | (defvar fortran-break-before-delimiters t | 162 | (defvar fortran-break-before-delimiters t |
| 163 | "*Non-nil causes `fortran-do-auto-fill' to break lines before delimiters.") | 163 | "*Non-nil causes `fortran-fill' to break lines before delimiters.") |
| 164 | 164 | ||
| 165 | (if fortran-mode-syntax-table | 165 | (if fortran-mode-syntax-table |
| 166 | () | 166 | () |
| @@ -442,7 +442,7 @@ Variables controlling indentation style and extra features: | |||
| 442 | Non-nil causes line number digits to be moved to the correct column | 442 | Non-nil causes line number digits to be moved to the correct column |
| 443 | as typed. (default t) | 443 | as typed. (default t) |
| 444 | fortran-break-before-delimiters | 444 | fortran-break-before-delimiters |
| 445 | Non-nil causes `fortran-do-auto-fill' breaks lines before delimiters. | 445 | Non-nil causes `fortran-fill' breaks lines before delimiters. |
| 446 | (default t) | 446 | (default t) |
| 447 | fortran-startup-message | 447 | fortran-startup-message |
| 448 | Set to nil to inhibit message first time Fortran mode is used. | 448 | Set to nil to inhibit message first time Fortran mode is used. |
| @@ -1034,7 +1034,7 @@ The marks are pushed." | |||
| 1034 | (> (save-excursion (end-of-line) (current-column)) fill-column)) | 1034 | (> (save-excursion (end-of-line) (current-column)) fill-column)) |
| 1035 | (save-excursion | 1035 | (save-excursion |
| 1036 | (end-of-line) | 1036 | (end-of-line) |
| 1037 | (fortran-do-auto-fill))) | 1037 | (fortran-fill))) |
| 1038 | (if fortran-blink-matching-if | 1038 | (if fortran-blink-matching-if |
| 1039 | (progn | 1039 | (progn |
| 1040 | (fortran-blink-matching-if) | 1040 | (fortran-blink-matching-if) |
| @@ -1408,11 +1408,15 @@ automatically breaks the line at a previous space." | |||
| 1408 | (if (if (null arg) | 1408 | (if (if (null arg) |
| 1409 | (not auto-fill-function) | 1409 | (not auto-fill-function) |
| 1410 | (> (prefix-numeric-value arg) 0)) | 1410 | (> (prefix-numeric-value arg) 0)) |
| 1411 | 'fortran-indent-line | 1411 | 'fortran-do-auto-fill |
| 1412 | nil)) | 1412 | nil)) |
| 1413 | (force-mode-line-update))) | 1413 | (force-mode-line-update))) |
| 1414 | 1414 | ||
| 1415 | (defun fortran-do-auto-fill () | 1415 | (defun fortran-do-auto-fill () |
| 1416 | (if (> (current-column) fill-column) | ||
| 1417 | (fortran-indent-line))) | ||
| 1418 | |||
| 1419 | (defun fortran-fill () | ||
| 1416 | (interactive) | 1420 | (interactive) |
| 1417 | (let* ((opoint (point)) | 1421 | (let* ((opoint (point)) |
| 1418 | (bol (save-excursion (beginning-of-line) (point))) | 1422 | (bol (save-excursion (beginning-of-line) (point))) |
| @@ -1510,7 +1514,7 @@ automatically breaks the line at a previous space." | |||
| 1510 | (end-of-line) | 1514 | (end-of-line) |
| 1511 | (delete-region (point) (match-end 0)) | 1515 | (delete-region (point) (match-end 0)) |
| 1512 | (delete-horizontal-space) | 1516 | (delete-horizontal-space) |
| 1513 | (fortran-do-auto-fill)) | 1517 | (fortran-fill)) |
| 1514 | (fortran-split-line)) | 1518 | (fortran-split-line)) |
| 1515 | (if comment-string | 1519 | (if comment-string |
| 1516 | (save-excursion | 1520 | (save-excursion |