From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Make register easier to hook Date: Mon, 28 Mar 2011 10:37:05 -0700 Message-ID: <4D90C741.2090808@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig89847122F9FCC2B8349A2628" X-Trace: dough.gmane.org 1301333988 28376 80.91.229.12 (28 Mar 2011 17:39:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Mar 2011 17:39:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 28 19:39:43 2011 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.69) (envelope-from ) id 1Q4GPj-00065h-EF for ged-emacs-devel@m.gmane.org; Mon, 28 Mar 2011 19:39:42 +0200 Original-Received: from localhost ([127.0.0.1]:55350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4GPR-0006Zs-NH for ged-emacs-devel@m.gmane.org; Mon, 28 Mar 2011 13:39:21 -0400 Original-Received: from [140.186.70.92] (port=55154 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4GNT-0005kU-7b for emacs-devel@gnu.org; Mon, 28 Mar 2011 13:37:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4GNK-0005rk-GC for emacs-devel@gnu.org; Mon, 28 Mar 2011 13:37:11 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:63593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4GNK-0005re-B7 for emacs-devel@gnu.org; Mon, 28 Mar 2011 13:37:10 -0400 Original-Received: by iyf13 with SMTP id 13so4985783iyf.0 for ; Mon, 28 Mar 2011 10:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type; bh=SWdHQ79chTX/4LKTGLjc+FAemw1JGn4CgYRBPF9Cpn8=; b=QZZWspxofWSh2JN51EFW4gWTilr/xsuXOWN7ucokKvcBfJ5gNXPTWF4CpdGsg2unAr dw+xfHmPVwoBd3fyvkhy6DeZD5Xfs8gU3EpNcPBNjYikqJj/vPzz6Z47g0gmCuNKclBm +lFmp6BGqvBBBDfPKzOnRptg6v2svfTBr5QuY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=wks95tRyiW7xEPYoMfS83AN1fZjugLJa0TNQuF0c9EWxzLaTqDbChcLZhD4NQX/BzZ 6knp9lKx8O80dVmcXNA2Y5uY/hBpBUkyYxAu850GOgapjiNKZWftPNqQnFuFn3ZPLfnX mNZvXuVeZWaHdOJesavjBavZwLOvceFJvGvgc= Original-Received: by 10.42.167.198 with SMTP id t6mr1110601icy.296.1301333829638; Mon, 28 Mar 2011 10:37:09 -0700 (PDT) Original-Received: from [192.168.1.2] (c-67-183-23-114.hsd1.wa.comcast.net [67.183.23.114]) by mx.google.com with ESMTPS id 13sm3071526ibo.59.2011.03.28.10.37.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Mar 2011 10:37:09 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: X-Enigmail-Version: 1.1.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 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:137784 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig89847122F9FCC2B8349A2628 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Leo, On 3/28/11 8:35 AM, Leo wrote: > I would like to extend register.el so that 3rd party packages can add > new register and have C-x r j, C-x r i and M-x list-registers work with= > it without needing to modify register.el. >=20 > With the attached draft patch, one can now do: >=20 > (defun WHATEVER-to-register (register) > (interactive) > (register-set register > (register-make :info WHATEVER > :jump-func function-to-handle-WHATEVER))= ) >=20 > And C-x r j will call function-to-handle-WHATEVER for jumping. >=20 > Any comments will be highly appreciated. Thanks. Thanks for doing this work. An extensible register system is also on my wishlist. Why did you decide to use the list for the register structure instead of the default vector representation? Also, have you considered eliminating the `info' slot? Users can construct closures over any necessary variables and assign these closures to the register structure's remaining function slots. After all, we're getting lexbind, and this feature will make constructing closures both easy and safe. Thanks, Daniel Colascione --------------enig89847122F9FCC2B8349A2628 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iEYEARECAAYFAk2Qx0MACgkQ17c2LVA10Vtl7QCgzCt3ATrULvuKb3kCZyB4QoBc PAkAnj1V7zWgo4/+GFi9y8+YiI+bAN5z =mHCQ -----END PGP SIGNATURE----- --------------enig89847122F9FCC2B8349A2628--