[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs registers above 255

From: Stefan Monnier
Subject: Re: Emacs registers above 255
Date: Wed, 19 May 2010 13:18:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> according to the documentation, registers are characters up to 255.
> But the actual implementation is very simple and permits storing
> "anything" in `register-alist' using `set-register'; it's just that the
> UI functions use the "c" interactive spec, so you can't really enter
> anything other than a character inputtable without an input method.

> My question is: would you consider it too much of a hack if a package
> used registers above 255 to not clobber the standard registers, but on
> the other hand be able to use the existing infrastructure (my example
> use case would be implementing Vim-compatible registers in an emulation
> package)? 

It would probably be a hack, but it would seem like a fair hack to me.
The main limitation I can see is that the "names" of registers are
compared with `eq', so cons cells wouldn't work too well, but symbols or
negative numbers would work.

This said, I'm not sure why you'd want to use separate registers: I'd
expect it would rather be better if the Vim emulation is integrated with
the rest of Emacs's infrastructure, so being able to set a register with
Vim-emulation and then get it back using Emacs commands would seem like
a desirable feature.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]