From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Fix previous-button to work with connected buttons Date: Sun, 11 Mar 2007 11:45:12 +0900 Message-ID: <873b4c7b2f.fsf@catnip.gol.com> References: <87wt1o8xl6.fsf@x3y2z1.net> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173581147 20883 80.91.229.12 (11 Mar 2007 02:45:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Mar 2007 02:45:47 +0000 (UTC) Cc: Diane Murray , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 11 03:45:41 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 1HQE44-00010a-H0 for ged-emacs-devel@m.gmane.org; Sun, 11 Mar 2007 03:45:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQE4Y-0004np-Sb for ged-emacs-devel@m.gmane.org; Sat, 10 Mar 2007 21:46:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HQE4M-0004iq-A6 for emacs-devel@gnu.org; Sat, 10 Mar 2007 21:45:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HQE4K-0004eb-Nz for emacs-devel@gnu.org; Sat, 10 Mar 2007 21:45:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQE4K-0004e1-Ig for emacs-devel@gnu.org; Sat, 10 Mar 2007 21:45:56 -0500 Original-Received: from smtp02.dentaku.gol.com ([203.216.5.72]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HQE3l-0003eP-Bo; Sat, 10 Mar 2007 21:45:21 -0500 Original-Received: from 203-216-97-073.dsl.gol.ne.jp ([203.216.97.73] helo=catnip.gol.com) by smtp02.dentaku.gol.com with esmtpa (Dentaku) id 1HQE3h-0005Fx-IX; Sun, 11 Mar 2007 11:45:17 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id CF8DC2F4B; Sun, 11 Mar 2007 11:45:13 +0900 (JST) System-Type: i686-pc-linux-gnu In-Reply-To: (Stefan Monnier's message of "Sat\, 10 Mar 2007 21\:08\:51 -0500") Original-Lines: 25 X-Abuse-Complaints: abuse@gol.com 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:67700 Archived-At: Stefan Monnier writes: >> Neither `previous-button' nor `next-button' work well with neighboring >> buttons inserted with `insert-text-button' - this patch is *not* able >> to solve that problem. > > I think the patch below should provide a general fix. Please don't do that -- one of the goals of buttons is to work reasonably well if there are _lots_ of them, and that was the main reason for supporting both "overlay" and "text" buttons. If you have lots of buttons, creating a unique marker for each button has nasty results (I've tested it). [If adjacent buttons are important, I'd rather do something that only affects that case. For instance, I suppose a hacky approach might be to have two different button properties, like `button' and `button2', and use `button2' if inserting just before another button that uses `button'] Thanks, -Miles -- Saa, shall we dance? (from a dance-class advertisement)