]> git.eshelyaron.com Git - emacs.git/commitdiff
(fortran-strip-sqeuence-nos): New command.
authorDave Love <fx@gnu.org>
Tue, 30 Nov 1999 19:38:27 +0000 (19:38 +0000)
committerDave Love <fx@gnu.org>
Tue, 30 Nov 1999 19:38:27 +0000 (19:38 +0000)
lisp/progmodes/fortran.el

index bda9585f7b6e7cc165a19c4fef43502b0d94c54e..d438e89ff9398795cf89dc7af9eebafd986c14bd 100644 (file)
@@ -1808,6 +1808,18 @@ Intended as the value of `fill-paragraph-function'."
          (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