emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/yaml-mode 40067a1 096/124: Merge pull request #62 from ts4


From: ELPA Syncer
Subject: [nongnu] elpa/yaml-mode 40067a1 096/124: Merge pull request #62 from ts4z/master
Date: Sun, 29 Aug 2021 11:36:20 -0400 (EDT)

branch: elpa/yaml-mode
commit 40067a10ac1360f0b9533f0bbbb2eea128e2574d
Merge: 3fc5a33 78b3ba5
Author: Vasilij Schneidermann <mail@vasilij.de>
Commit: GitHub <noreply@github.com>

    Merge pull request #62 from ts4z/master
    
    fill while in a comment should behave as in text modes
---
 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]