emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs registers above 255


From: David Kastrup
Subject: Re: Emacs registers above 255
Date: Wed, 19 May 2010 16:15:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Štěpán Němec <address@hidden> writes:

> Hello,
>
> 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.

Huh?

(defun weird-check (c) (interactive "c") c)
(call-interactively 'weird-check) => 265
[after inputting ĉ using an X11 input method rather than an Emacs one]

> 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)?

You are assuming that a keyboard can only deliver single-byte
characters, namely that Emacs is the only multi-byte capable environment
on a given computer.

That's simply wrong.

-- 
David Kastrup




reply via email to

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