aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLawrence Mitchell2011-09-19 21:12:05 -0700
committerGlenn Morris2011-09-19 21:12:05 -0700
commitf84e2fe26c96da1e9091bbdffebb55304c9b44c8 (patch)
treeb5c46762dcfcfcb0bd8b1addf8650f940a6b77bc
parent78054a469de3f8942d96eaf8c024070700ac9bae (diff)
downloademacs-f84e2fe26c96da1e9091bbdffebb55304c9b44c8.tar.gz
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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/f90.el6
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3c2eb430f30..2f4f7051250 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12011-09-20 Lawrence Mitchell <wence@gmx.li>
2
3 * progmodes/f90.el (f90-break-line): If breaking inside comment delete
4 all whitespace around breakpoint. (Bug#9553)
5 (f90-find-breakpoint): Only break at whitespace inside a comment.
6
12011-09-20 Stefan Monnier <monnier@iro.umontreal.ca> 72011-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * minibuffer.el (completion-file-name-table): Keep track of errors. 9 * minibuffer.el (completion-file-name-table): Keep track of errors.
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."
2000 (cond ((f90-in-string) 2000 (cond ((f90-in-string)
2001 (insert "&\n&")) 2001 (insert "&\n&"))
2002 ((f90-in-comment) 2002 ((f90-in-comment)
2003 (delete-horizontal-space 'backwards) ; remove trailing whitespace 2003 (delete-horizontal-space) ; remove trailing whitespace
2004 (insert "\n" (f90-get-present-comment-type))) 2004 (insert "\n" (f90-get-present-comment-type)))
2005 (t (insert "&") 2005 (t (insert "&")
2006 (or no-update (f90-update-line)) 2006 (or no-update (f90-update-line))
@@ -2012,7 +2012,9 @@ is non-nil, call `f90-update-line' after inserting the continuation marker."
2012 2012
2013(defun f90-find-breakpoint () 2013(defun f90-find-breakpoint ()
2014 "From `fill-column', search backward for break-delimiter." 2014 "From `fill-column', search backward for break-delimiter."
2015 (re-search-backward f90-break-delimiters (line-beginning-position)) 2015 (if (f90-in-comment)
2016 (re-search-backward "\\s-" (line-beginning-position))
2017 (re-search-backward f90-break-delimiters (line-beginning-position)))
2016 (if (not f90-break-before-delimiters) 2018 (if (not f90-break-before-delimiters)
2017 (forward-char (if (looking-at f90-no-break-re) 2 1)) 2019 (forward-char (if (looking-at f90-no-break-re) 2 1))
2018 (backward-char) 2020 (backward-char)