Skip to content

Commit

Permalink
Merge pull request #62 from ts4z/master
Browse files Browse the repository at this point in the history
fill while in a comment should behave as in text modes
  • Loading branch information
wasamasa committed Apr 9, 2018
2 parents 3fc5a33 + 78b3ba5 commit 40067a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions yaml-mode.el
Expand Up @@ -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)
Expand Down

0 comments on commit 40067a1

Please sign in to comment.