>>>>> "Nikolaj" == Nikolaj Schumacher <[EMAIL PROTECTED]> writes:

> Hello,

> `canonically-space-region' doesn't stop at the end of the region.
> That's because it limits its searches at `end', while the actual region
> keeps getting smaller.

I've installed the patch below to fix this problem.

> `fill-delete-newlines' has the same problem because it calls
> `canonically-space-region' and because it uses the `to' variable
> afterwards.

I don't think it's a real problem: fill-delete-newlines should simply always
be called with a marker as second argument (and this is currently the case
in the only call to it).  Most code in fill.el relies on this everywhere.
I just overlooked that canonically-space-region is interactive and should
hence double check its argument.


        Stefan


--- fill.el     16 mai 2007 11:59:30 -0400      1.203
+++ fill.el     24 mai 2007 11:56:08 -0400      
@@ -159,6 +159,11 @@
 and `sentence-end-without-period').
 Remove indentation from each line."
   (interactive "*r")
+  ;; Ideally, we'd want to scan the text from the end, so that changes to
+  ;; text don't affect the boundary, but the regexp we match against does
+  ;; not match as eagerly when matching backward, so we instead use
+  ;; a marker.
+  (unless (markerp end) (setq end (copy-marker end t)))
   (let ((end-spc-re (concat "\\(" (sentence-end) "\\) *\\|  +")))
     (save-excursion
       (goto-char beg)



_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to