GNU bug report logs - #14397
24.3; <C-kp-1> and <M-kp-1> undefined

Previous Next

Package: emacs;

Reported by: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>

Date: Tue, 14 May 2013 10:43:02 UTC

Severity: normal

Found in version 24.3

Fixed in version 24.4

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> jurta.org>
To: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
Cc: 14397 <at> debbugs.gnu.org
Subject: Re: bug#14397: 24.3; <C-kp-1> and <M-kp-1> undefined
Date: Fri, 06 Dec 2013 03:15:12 +0200
> Indeed, it would fix the issue ; but from what I gather, the suggestion
> was dismissed because it makes function-key-map too big (and so does my
> suggestion).
>
> Adding "functional keymap" support as suggested in
> http://article.gmane.org/gmane.emacs.devel/153726 seems beyond my
> ability.

Neither functional keymaps nor keymaps with pattern matching
are quick to implement, at least not until the feature freeze,
so it would be better now just to add all combinations
using `todo-powerset' to completely support keypad keys
in the next release.

The current code is following, but maybe `todo-powerset' should be moved
to bindings.el or other appropriate place like cl-seq.el.

(let ((modifiers (todo-powerset '(control meta shift super hyper)))
      (keys '((kp-end . end) (kp-down . down) (kp-next . next)
	      (kp-left . left) (kp-begin . begin) (kp-right . right)
	      (kp-home . home) (kp-up . up) (kp-prior . prior)
	      (kp-insert . insert) (kp-delete . delete) (kp-enter . enter)
	      (kp-add . +) (kp-subtract . -) (kp-multiply . *) (kp-divide . /)
	      (kp-1 . ?1) (kp-2 . ?2) (kp-3 . ?3) (kp-4 . ?4) (kp-5 . ?5)
	      (kp-6 . ?6) (kp-7 . ?7) (kp-8 . ?8) (kp-9 . ?9) (kp-0 . ?0)
	      (kp-decimal . .))))
  (dolist (pair keys)
    (dolist (mod modifiers)
      (define-key function-key-map
	(vector (append mod (list (car pair))))
	(vector (append mod (list (cdr pair))))))))




This bug report was last modified 11 years and 167 days ago.

Previous Next


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