GNU bug report logs - #8415
23.3.50; Extensible Emacs Registers

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sun, 3 Apr 2011 12:30:03 UTC

Severity: wishlist

Tags: patch

Found in version 23.3.50

Fixed in version 24.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #46 received at 8415 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo <sdl.web <at> gmail.com>
Cc: Davis Herring <herring <at> lanl.gov>, 8415 <at> debbugs.gnu.org,
	Daniel Colascione <dan.colascione <at> gmail.com>
Subject: Re: bug#8415: 23.3.50; Extensible Emacs Registers
Date: Wed, 06 Apr 2011 11:38:43 -0400
>>>>> "Leo" == Leo  <sdl.web <at> gmail.com> writes:

> On 2011-04-05 21:50 +0800, Stefan Monnier wrote:
>>>> The end point is pretty much the same, but all the intermediate steps
>>>> are safe and easy to check.
>>> I think a structure still is a better approach.
>> 
>> I already agreed in the previous message.
>> 
>> 
>> Stefan

> Sorry if I have missed that.

> The alternative you propose, i.e. making the value a structure is
> actually the first approach I attempted in
> http://article.gmane.org/gmane.emacs.devel/137781.

I think that's a better approach, yes (tho I'd pass the register object
to the functions, so instead of:

   (let* ((object (register-get register))
 	 (val (if (register-p object)
 		  (register-info object)
 		object))
 	 (jump (and (register-p object)
 		    (register-jump-func object))))
     (cond
      (jump (funcall jump val))

you just have

   (let* ((object (register-get register))
 	 (jump (and (register-p object)
 		    (register-jump-func object))))
     (cond
      (jump (funcall jump object))

or
      
   (let* ((object (register-get register)))
     (cond
      ((register-p object) (funcall (or (register-jump-func object)
                                        (error "Don't know how to jump"))
                                    object))

> 1. all existing register-creating commands need to use the new
>    implementation, so the patch won't be any smaller.

That's for subsequent patches.

> 2. needs explicitly creating a register-value struct i.e.
>   (register-set ?a (register-value-make ....)).

I see that as a feature.


        Stefan




This bug report was last modified 13 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.