bongo-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bongo-patches] Fix region bug in `bongo-universal-prefix/region/marking


From: Daniel Brockman
Subject: [bongo-patches] Fix region bug in `bongo-universal-prefix/region/marking-object-command'
Date: Thu, 03 May 2007 02:17:16 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

Fix region bug in
`bongo-universal-prefix/region/marking-object-command' and
`bongo-universal-prefix/region/marking-track-command'
(original patch by Daniel Jensen).

diff -rN -u old-bongo/bongo.el new-bongo/bongo.el
--- old-bongo/bongo.el  2007-05-03 02:16:43.000000000 +0200
+++ new-bongo/bongo.el  2007-05-03 02:16:43.000000000 +0200
@@ -3828,14 +3828,15 @@
                  (bongo-yank-marking))))
             ((bongo-region-active-p)
              (deactivate-mark)
-             (let ((marking bongo-marking))
+             (let ((marking bongo-marking)
+                   (end (region-end)))
                (when marking
                  ;; XXX: This discards the killed marking
                  ;;      as an unfortunate side-effect.
                  (bongo-kill-marking))
                (goto-char (region-beginning))
                (while (and (bongo-snap-to-object-line 'no-error)
-                           (< (point) (region-end)))
+                           (< (point) end))
                  (command-execute command)
                  (goto-char (bongo-point-after-object)))
                (when marking
@@ -3906,7 +3907,8 @@
                  (bongo-yank-marking))))
             ((bongo-region-active-p)
              (deactivate-mark)
-             (let ((marking bongo-marking))
+             (let ((marking bongo-marking)
+                   (end (region-end)))
                (when marking
                  ;; XXX: This discards the killed marking
                  ;;      as an unfortunate side-effect.
@@ -3915,7 +3917,7 @@
                (while (and (or (bongo-track-line-p)
                                (goto-char (or (bongo-point-at-next-track-line)
                                               (point-max))))
-                           (< (point) (region-end)))
+                           (< (point) end))
                  (command-execute command)
                  (forward-line 1))
                (when marking
-- 
Daniel Brockman <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]