diff options
author | Mattias M <mattias@marka.ee> | 2021-01-28 07:34:10 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-01-28 07:34:10 +0100 |
commit | e7e7ef15886ce28d1d1873164e7ee17a6a5878e0 (patch) | |
tree | d83a593724600559cf09243d6a8bafb175e6e580 /test | |
parent | 0870ebb3cbfcb097d85eea5eacaf992dd88ed204 (diff) | |
download | emacs-e7e7ef15886ce28d1d1873164e7ee17a6a5878e0.tar.gz |
Fix fill-paragraph in asm-mode
* lisp/progmodes/asm-mode.el: The value of fill-prefix ought to be nil
not "\t" so that fill-context-prefix can do its thing. In fact,
fill-prefix does not have to be set at all becuase asm-mode derives
from prog-mode and fill-prefix is set in simple.el.
* test/lisp/progmodes/asm-mode-tests.el: Add relevant test (bug#41064).
Copyright-paperwork-exempt: yes
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/progmodes/asm-mode-tests.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lisp/progmodes/asm-mode-tests.el b/test/lisp/progmodes/asm-mode-tests.el index 6ae4fdf5850..87872179d93 100644 --- a/test/lisp/progmodes/asm-mode-tests.el +++ b/test/lisp/progmodes/asm-mode-tests.el @@ -69,4 +69,14 @@ (should (string-match-p ";;; \nlabel:" (buffer-string))) (should (= (current-column) 4)))) +(ert-deftest asm-mode-tests-fill-comment () + (asm-mode-tests--with-temp-buffer + (call-interactively #'comment-dwim) + (insert "Pellentesque condimentum, magna ut suscipit hendrerit, \ +ipsum augue ornare nulla, non luctus diam neque sit amet urna.") + (call-interactively #'fill-paragraph) + (should (equal (buffer-string) "\t;; Pellentesque condimentum, \ +magna ut suscipit hendrerit,\n\t;; ipsum augue ornare nulla, non \ +luctus diam neque sit amet\n\t;; urna.")))) + ;;; asm-mode-tests.el ends here |