emacs-devel
[Top][All Lists]
Advanced

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

Re: Fix previous-button to work with connected buttons


From: Richard Stallman
Subject: Re: Fix previous-button to work with connected buttons
Date: Sun, 01 Apr 2007 10:00:01 -0400

Would someone please install this, if it is correct, and then ack?

Date: Sun, 01 Apr 2007 04:28:10 +0200
From: Diane Murray <address@hidden>
To: address@hidden
Subject: Re: Fix previous-button to work with connected buttons

The latest changes to button.el have added a new distinct button
property which makes it possible to correctly determine that
neighboring buttons are different and to navigate through them even
when they are right next to each other.  There is still one little
bug, however, which I corrected in a patch I sent in my original email
- the problem it fixes is that any previous adjacent button is
skipped.  Please see the patch below with a new diff from the latest
revision.


2007-04-01  Diane Murray  <address@hidden>

        * button.el (previous-button): Fixed to work correctly when two
        buttons are next to each other.


*** button.el   28 Mar 2007 03:20:30 -0000      1.23
--- button.el   1 Apr 2007 02:21:12 -0000
***************
*** 372,378 ****
    (unless count-current
      (setq pos (previous-single-char-property-change pos 'button)))
    (and (> pos (point-min))
!        (or (button-at (1- pos))
           ;; We must have originally been on a button, and are now in
           ;; the inter-button space.  Recurse to find a button.
           (previous-button pos))))
--- 372,378 ----
    (unless count-current
      (setq pos (previous-single-char-property-change pos 'button)))
    (and (> pos (point-min))
!        (or (button-at pos)
           ;; We must have originally been on a button, and are now in
           ;; the inter-button space.  Recurse to find a button.
           (previous-button pos))))


_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel





reply via email to

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