comparison lisp/progmodes/cperl-mode.el @ 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 5b728a418323
children 96f4b4c88092
comparison
equal deleted inserted replaced
53811:dce224f6353c 53812:80c9f33653f7
4311 (save-excursion 4311 (save-excursion
4312 (while (progn (forward-line 1) 4312 (while (progn (forward-line 1)
4313 (looking-at "^[ \t]*#+[ \t]*[^ \t\n#]"))) 4313 (looking-at "^[ \t]*#+[ \t]*[^ \t\n#]")))
4314 (point))) 4314 (point)))
4315 ;; Remove existing hashes 4315 ;; Remove existing hashes
4316 (goto-char (point-min)) 4316 (save-excursion
4317 (while (progn (forward-line 1) (< (point) (point-max))) 4317 (goto-char (point-min))
4318 (skip-chars-forward " \t") 4318 (while (progn (forward-line 1) (< (point) (point-max)))
4319 (and (looking-at "#+") 4319 (skip-chars-forward " \t")
4320 (delete-char (- (match-end 0) (match-beginning 0))))) 4320 (and (looking-at "#+")
4321 (delete-char (- (match-end 0) (match-beginning 0))))))
4321 4322
4322 ;; Lines with only hashes on them can be paragraph boundaries. 4323 ;; Lines with only hashes on them can be paragraph boundaries.
4323 (let ((paragraph-start (concat paragraph-start "\\|^[ \t#]*$")) 4324 (let ((paragraph-start (concat paragraph-start "\\|^[ \t#]*$"))
4324 (paragraph-separate (concat paragraph-start "\\|^[ \t#]*$")) 4325 (paragraph-separate (concat paragraph-start "\\|^[ \t#]*$"))
4325 (fill-prefix comment-fill-prefix)) 4326 (fill-prefix comment-fill-prefix))