[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e7e7ef1: Fix fill-paragraph in asm-mode
From: |
Lars Ingebrigtsen |
Subject: |
master e7e7ef1: Fix fill-paragraph in asm-mode |
Date: |
Thu, 28 Jan 2021 01:34:20 -0500 (EST) |
branch: master
commit e7e7ef15886ce28d1d1873164e7ee17a6a5878e0
Author: Mattias M <mattias@marka.ee>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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
---
lisp/progmodes/asm-mode.el | 3 +--
test/lisp/progmodes/asm-mode-tests.el | 10 ++++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el
index 62ff783..99b2ec6 100644
--- a/lisp/progmodes/asm-mode.el
+++ b/lisp/progmodes/asm-mode.el
@@ -141,8 +141,7 @@ Special commands:
(setq-local comment-add 1)
(setq-local comment-start-skip "\\(?:\\s<+\\|/[/*]+\\)[ \t]*")
(setq-local comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)")
- (setq-local comment-end "")
- (setq fill-prefix "\t"))
+ (setq-local comment-end ""))
(defun asm-indent-line ()
"Auto-indent the current line."
diff --git a/test/lisp/progmodes/asm-mode-tests.el
b/test/lisp/progmodes/asm-mode-tests.el
index 6ae4fdf..8787217 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e7e7ef1: Fix fill-paragraph in asm-mode,
Lars Ingebrigtsen <=