]> git.eshelyaron.com Git - emacs.git/commitdiff
(cperl-fill-paragraph): Call fill-paragraph
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 4 Feb 2004 22:55:17 +0000 (22:55 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 4 Feb 2004 22:55:17 +0000 (22:55 +0000)
with point inside rather than after the paragraph.

lisp/progmodes/cperl-mode.el

index 7202a083d7915f02e91c7a27186da1f3c67280bf..155648fadb1752e158383977bd6290b7cedeef36 100644 (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#]*$"))