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 15:12:11 +0900 Message-ID: <87tzws5mx0.fsf@catnip.gol.com> References: <87wt1o8xl6.fsf@x3y2z1.net> <873b4c7b2f.fsf@catnip.gol.com> 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 1173593580 10490 80.91.229.12 (11 Mar 2007 06:13:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Mar 2007 06:13:00 +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 07:12:53 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 1HQHIW-0003kb-Ia for ged-emacs-devel@m.gmane.org; Sun, 11 Mar 2007 07:12:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQHJ1-0002yr-Bu for ged-emacs-devel@m.gmane.org; Sun, 11 Mar 2007 01:13:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HQHIl-0002yi-3M for emacs-devel@gnu.org; Sun, 11 Mar 2007 01:13:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HQHIh-0002y3-Lv for emacs-devel@gnu.org; Sun, 11 Mar 2007 01:13:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQHIh-0002y0-Gv for emacs-devel@gnu.org; Sun, 11 Mar 2007 01:12:59 -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 1HQHI5-0006mu-2w; Sun, 11 Mar 2007 01:12: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 1HQHHx-0000bz-46; Sun, 11 Mar 2007 15:12:13 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 93D1A2F4B; Sun, 11 Mar 2007 15:12:11 +0900 (JST) System-Type: i686-pc-linux-gnu In-Reply-To: (Stefan Monnier's message of "Sun\, 11 Mar 2007 01\:00\:21 -0500") Original-Lines: 17 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:67711 Archived-At: Stefan Monnier writes: > How 'bout the patch below, then? > + (add-text-properties beg end > + ;; Each button should have a different `button' > + ;; property so that next-single-property-change can > + ;; detect boundaries reliably. > + (cons 'button (cons (list t) properties))) Hmm. Any reason to waste a cons-cell? I imagine something like (cons 'button (cons (setq button-counter (1+ button-counter)) properties)) would work as well. -Miles -- The key to happiness is having dreams. [from a fortune cookie]