Daniel Brockman <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] (Daniel Jensen) writes:
>
>> In `bongo-universal-prefix/region/marking-object-command', like so:
>>
>>              (let ((marking bongo-marking)
>>                    (beg (region-beginning))
>>                    (end (region-end)))
>
> I saw no reason to save `(region-beginning)', so I just
> saved the end.

Yes, that's right.

I spotted another problem with the region. The executed command can
insert or delete text, but the end position does not move with the
change. So we have to use a marker here.

diff -Naur bongo-old/bongo.el bongo-new/bongo.el
--- bongo-old/bongo.el	2007-05-04 13:18:13.000000000 +0200
+++ bongo-new/bongo.el	2007-05-04 13:20:51.000000000 +0200
@@ -3829,7 +3829,7 @@
             ((bongo-region-active-p)
              (deactivate-mark)
              (let ((marking bongo-marking)
-                   (end (region-end)))
+                   (end (move-marker (make-marker) (region-end))))
                (when marking
                  ;; XXX: This discards the killed marking
                  ;;      as an unfortunate side-effect.
@@ -3839,6 +3839,7 @@
                            (< (point) end))
                  (command-execute command)
                  (goto-char (bongo-point-after-object)))
+               (move-marker end nil)
                (when marking
                  (bongo-yank-marking))))
             (bongo-marking
@@ -3908,7 +3909,7 @@
             ((bongo-region-active-p)
              (deactivate-mark)
              (let ((marking bongo-marking)
-                   (end (region-end)))
+                   (end (move-marker (make-marker) (region-end))))
                (when marking
                  ;; XXX: This discards the killed marking
                  ;;      as an unfortunate side-effect.
@@ -3920,6 +3921,7 @@
                            (< (point) end))
                  (command-execute command)
                  (forward-line 1))
+               (move-marker end nil)
                (when marking
                  (bongo-yank-marking))))
             (bongo-marking
There is a related problem with the prefix argument version. For
example, `3 M-& k' would kill tracks 1, 3 and 5, certainly not the
intended result. How should we address this?
_______________________________________________
bongo-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bongo-devel

Reply via email to