From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Fix previous-button to work with connected buttons Date: Sun, 01 Apr 2007 10:00:01 -0400 Message-ID: References: <87wt1o8xl6.fsf@x3y2z1.net> <87648gzv45.fsf@x3y2z1.net> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1175436149 24202 80.91.229.12 (1 Apr 2007 14:02:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Apr 2007 14:02:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 01 16:02:28 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HY0dX-0001ts-T1 for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2007 16:02:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HY0gS-0008Uj-4U for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2007 10:05:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HY0gI-0008EH-3l for emacs-devel@gnu.org; Sun, 01 Apr 2007 10:05:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HY0gH-0008Db-Jf for emacs-devel@gnu.org; Sun, 01 Apr 2007 10:05:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HY0gH-0008DM-9d for emacs-devel@gnu.org; Sun, 01 Apr 2007 10:05:17 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HY0dL-0003tt-CZ for emacs-devel@gnu.org; Sun, 01 Apr 2007 10:02:15 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HY0bB-0006rs-OS; Sun, 01 Apr 2007 10:00:01 -0400 In-reply-to: <87648gzv45.fsf@x3y2z1.net> (message from Diane Murray on Sun, 01 Apr 2007 04:28:10 +0200) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68885 Archived-At: Would someone please install this, if it is correct, and then ack? Date: Sun, 01 Apr 2007 04:28:10 +0200 From: Diane Murray To: emacs-devel@gnu.org 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 * 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 Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel