mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
(fortran-strip-sqeuence-nos): New command.
This commit is contained in:
parent
3156909f7e
commit
3b4613a485
1 changed files with 12 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue