Mercurial > emacs
changeset 53812:80c9f33653f7
(cperl-fill-paragraph): Call fill-paragraph
with point inside rather than after the paragraph.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 04 Feb 2004 22:55:17 +0000 |
parents | dce224f6353c |
children | ddc4b99f4f8c |
files | lisp/progmodes/cperl-mode.el |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/cperl-mode.el Wed Feb 04 22:19:00 2004 +0000 +++ b/lisp/progmodes/cperl-mode.el Wed Feb 04 22:55:17 2004 +0000 @@ -4313,11 +4313,12 @@ (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#]*$"))