1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00

(cperl-fill-paragraph): Call fill-paragraph

with point inside rather than after the paragraph.
This commit is contained in:
Stefan Monnier 2004-02-04 22:55:17 +00:00
parent da75761f2f
commit cff301beed

View File

@ -4313,11 +4313,12 @@ indentation and initial hashes. Behaves usually outside of comment."
(looking-at "^[ \t]*#+[ \t]*[^ \t\n#]")))
(point)))
;; Remove existing hashes
(goto-char (point-min))
(while (progn (forward-line 1) (< (point) (point-max)))
(skip-chars-forward " \t")
(and (looking-at "#+")
(delete-char (- (match-end 0) (match-beginning 0)))))
(save-excursion
(goto-char (point-min))
(while (progn (forward-line 1) (< (point) (point-max)))
(skip-chars-forward " \t")
(and (looking-at "#+")
(delete-char (- (match-end 0) (match-beginning 0))))))
;; Lines with only hashes on them can be paragraph boundaries.
(let ((paragraph-start (concat paragraph-start "\\|^[ \t#]*$"))