[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/yaml-mode 78b3ba5 095/124: fill while in a comment should
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/yaml-mode 78b3ba5 095/124: fill while in a comment should behave as in text modes |
Date: |
Sun, 29 Aug 2021 11:36:20 -0400 (EDT) |
branch: elpa/yaml-mode
commit 78b3ba579f56f8a984c9cdaa56f3e730230840e9
Author: Tim Showalter <tjs@psaux.com>
Commit: Tim Showalter <tjs@psaux.com>
fill while in a comment should behave as in text modes
This fixes a bug in fill-paragraph that made adaptive fill not work
while in a comment (probably the only time it matters in yaml-mode).
This change does what lisp-mode does: first, try fill-comment-paragraph.
If fill-comment-paragraph does the fill, great; we're in a comment, and
the right thing happens. If it returns nil, it can't do the fill, and
we can fall back to the previous method.
Without this change, a paragraph break inside a comment, or other things
that adaptive fill would generally detect, are not respected.
---
yaml-mode.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/yaml-mode.el b/yaml-mode.el
index c3416dd..9f76c38 100644
--- a/yaml-mode.el
+++ b/yaml-mode.el
@@ -438,13 +438,15 @@ otherwise do nothing."
(defun yaml-fill-paragraph (&optional justify region)
"Fill paragraph.
-This behaves as `fill-paragraph' except that filling does not
-cross boundaries of block literals."
+Outside of comments, this behaves as `fill-paragraph' except that
+filling does not cross boundaries of block literals. Inside comments,
+this will do usual adaptive fill behaviors."
(interactive "*P")
(save-restriction
(yaml-narrow-to-block-literal)
(let ((fill-paragraph-function nil))
- (fill-paragraph justify region))))
+ (or (fill-comment-paragraph justify)
+ (fill-paragraph justify region)))))
(defun yaml-set-imenu-generic-expression ()
(make-local-variable 'imenu-generic-expression)
- [nongnu] elpa/yaml-mode 34b6367 041/124: Use font-lock-flush when available, (continued)
- [nongnu] elpa/yaml-mode 34b6367 041/124: Use font-lock-flush when available, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode a817e46 045/124: Bumping version to 0.0.12, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 93dd95c 051/124: remove regexp details from test-file, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode e9937d2 063/124: Backquote FTW, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 3dc2212 065/124: Remove obsolete `font-lock-syntactic-keywords` use, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 8d1f218 071/124: Spelling fix, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 5abb2f4 078/124: update yaml-mode-version, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 10dddc5 080/124: Fix typo in yaml-mode-version docstring, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 162f7e4 082/124: Treat alias nodes as punctuation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 756e64b 084/124: Don't consider a line a document delimiter if it has leading whitespace, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 78b3ba5 095/124: fill while in a comment should behave as in text modes,
ELPA Syncer <=
- [nongnu] elpa/yaml-mode 20d12a2 001/124: init, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 00ac9e5 116/124: Merge pull request #67 from HParker/fix-comment-indent, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 6694896 002/124: change e-mail, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 67348f3 014/124: dash (-) is a word character, see YAML spec 1.2 section 5.6, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 37469ca 015/124: Changed versions., ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode c7624d4 018/124: added *.elc to .gitignore, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 52d6d57 019/124: Merge pull request #3 from arthuraa/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 5eae0c1 031/124: Changed version to 0.0.9, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 5f92179 035/124: Merge pull request #15 from barrkel/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode bc66879 038/124: Use the syntax table for highlighting comments., ELPA Syncer, 2021/08/29