aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2004-02-04 22:55:17 +0000
committerStefan Monnier <[email protected]>2004-02-04 22:55:17 +0000
commitcff301beed3776a18def846d99753ef53ecfe277 (patch)
tree5de28c4f10c99fb338387f89edbd3b9e56a6a54b /lisp/progmodes
parentda75761f2f3bfa38ce4e8840374de19b9af32b92 (diff)
(cperl-fill-paragraph): Call fill-paragraph
with point inside rather than after the paragraph.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cperl-mode.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 7202a083d7..155648fadb 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -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#]*$"))