[Vimpulse] Arrow keys don't work as motions

Štěpán Němec stepnem at gmail.com
Sun Aug 22 21:54:34 CEST 2010


Nick Smallbone <nick.smallbone at gmail.com> writes:

> diff --git a/vimpulse-operator.el b/vimpulse-operator.el
> index 178e6cd..27af4d2 100644
> --- a/vimpulse-operator.el
> +++ b/vimpulse-operator.el
> @@ -350,8 +350,9 @@ (defun vimpulse-keypress-parser (&optional no-remap)
>                   (setq char (or (get char 'ascii-character) char))))
>               ;; This trick from simple.el's `digit-argument'
>               ;; converts keystrokes like C-0 and C-M-1 to digits.
> -             (when (characterp char)
> -               (setq digit (- (logand char ?\177) ?0)))
> +             (if (integerp char)
> +               (setq digit (- (logand char ?\177) ?0))
> +               (setq digit nil))
>               (if (keymapp cmd)
>                   (setq keys (vconcat keys (vector char)))
>                 (setq keys (vector char)))

Is the `characterp' -> `integerp' change really necessary? On XEmacs,
(integerp ?\C-0) => nil, although the integer <--> character arithmetic
(`-', `logand') works the same as in GNU Emacs.

Štěpán



More information about the implementations-list mailing list