diff options
| author | Stefan Monnier | 2008-02-28 22:29:03 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-02-28 22:29:03 +0000 |
| commit | dacce8310406e94994e6c7d8b63e73784134b431 (patch) | |
| tree | e4a42d255759040c5ced4054fba247a7ec9234e2 | |
| parent | 42b4ee207b146590df193db03be6487a26098797 (diff) | |
| download | emacs-dacce8310406e94994e6c7d8b63e73784134b431.tar.gz emacs-dacce8310406e94994e6c7d8b63e73784134b431.zip | |
(fill-comment-paragraph): Don't try to do comment-paragraph filling
if the commark doesn't match comment-start-skip.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f39d6a0d807..528f817a01f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2008-02-28 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-02-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * textmodes/fill.el (fill-comment-paragraph): Don't try to do | ||
| 4 | comment-paragraph filling if the commark doesn't match | ||
| 5 | comment-start-skip. | ||
| 6 | |||
| 3 | * uniquify.el (uniquify-buffer-base-name): Undo last change. | 7 | * uniquify.el (uniquify-buffer-base-name): Undo last change. |
| 4 | 8 | ||
| 5 | 2008-02-28 Daiki Ueno <ueno@unixuser.org> | 9 | 2008-02-28 Daiki Ueno <ueno@unixuser.org> |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 8c563656275..418d7c17dc2 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -837,7 +837,13 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'." | |||
| 837 | (goto-char comstart) (skip-chars-backward " \t") | 837 | (goto-char comstart) (skip-chars-backward " \t") |
| 838 | (setq has-code-and-comment (not (bolp))))) | 838 | (setq has-code-and-comment (not (bolp))))) |
| 839 | 839 | ||
| 840 | (if (not comstart) | 840 | (if (not (and comstart |
| 841 | ;; Make sure the comment-start mark we found is accepted by | ||
| 842 | ;; comment-start-skip. If not, all bets are off, and | ||
| 843 | ;; we'd better not mess with it. | ||
| 844 | (string-match comment-start-skip | ||
| 845 | (buffer-substring comstart comin)))) | ||
| 846 | |||
| 841 | ;; Return nil, so the normal filling will take place. | 847 | ;; Return nil, so the normal filling will take place. |
| 842 | nil | 848 | nil |
| 843 | 849 | ||