changeset 26665:4aede027bedb

(fortran-strip-sqeuence-nos): New command.
author Dave Love <fx@gnu.org>
date Tue, 30 Nov 1999 19:38:27 +0000
parents a7963e66c555
children dfcc7c6e14eb
files lisp/progmodes/fortran.el
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/fortran.el	Tue Nov 30 18:44:14 1999 +0000
+++ b/lisp/progmodes/fortran.el	Tue Nov 30 19:38:27 1999 +0000
@@ -1808,6 +1808,18 @@
 	  (fortran-previous-statement)))
     (fortran-indent-line)))
 
+(defun fortran-strip-sqeuence-nos (do-space)
+  "Delete all text after column 72 (assumed to be sequence numbers).
+Also delete trailing whitespace after stripping such text.  Supplying
+prefix arg DO-SPACE prevent stripping the whitespace."
+  (interactive "p")
+  (save-excursion
+    (goto-char (point-min))
+    (while (re-search-forward (concat "^" (make-string 72 ?.)" \\(.*\\)")
+			      nil t)
+      (replace-match "" nil nil nil 1)
+      (unless do-space (delete-horizontal-space)))))
+
 (provide 'fortran)
 
 ;;; fortran.el ends here