diff options
author | Lawrence Mitchell <wence@gmx.li> | 2011-09-19 21:12:05 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-09-19 21:12:05 -0700 |
commit | f84e2fe26c96da1e9091bbdffebb55304c9b44c8 (patch) | |
tree | b5c46762dcfcfcb0bd8b1addf8650f940a6b77bc /lisp/progmodes/f90.el | |
parent | 78054a469de3f8942d96eaf8c024070700ac9bae (diff) | |
download | emacs-f84e2fe26c96da1e9091bbdffebb55304c9b44c8.tar.gz emacs-f84e2fe26c96da1e9091bbdffebb55304c9b44c8.tar.bz2 emacs-f84e2fe26c96da1e9091bbdffebb55304c9b44c8.zip |
Fixes for f90.el filling in comments (bug#9553)
* lisp/progmodes/f90.el (f90-break-line): If breaking inside comment delete
all whitespace around breakpoint.
(f90-find-breakpoint): Only break at whitespace inside a comment.
Diffstat (limited to 'lisp/progmodes/f90.el')
-rw-r--r-- | lisp/progmodes/f90.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index cdb5f2a715d..7d239736dc1 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -2000,7 +2000,7 @@ is non-nil, call `f90-update-line' after inserting the continuation marker." (cond ((f90-in-string) (insert "&\n&")) ((f90-in-comment) - (delete-horizontal-space 'backwards) ; remove trailing whitespace + (delete-horizontal-space) ; remove trailing whitespace (insert "\n" (f90-get-present-comment-type))) (t (insert "&") (or no-update (f90-update-line)) @@ -2012,7 +2012,9 @@ is non-nil, call `f90-update-line' after inserting the continuation marker." (defun f90-find-breakpoint () "From `fill-column', search backward for break-delimiter." - (re-search-backward f90-break-delimiters (line-beginning-position)) + (if (f90-in-comment) + (re-search-backward "\\s-" (line-beginning-position)) + (re-search-backward f90-break-delimiters (line-beginning-position))) (if (not f90-break-before-delimiters) (forward-char (if (looking-at f90-no-break-re) 2 1)) (backward-char) |