From: Juri Linkov Date: Sat, 14 Jun 2014 09:50:13 +0000 (+0300) Subject: * lisp/bindings.el: Put `ascii-character' property on keypad keys mapped to characters. X-Git-Tag: emacs-24.3.92~78 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5be5f2854a9105e65679ef6af87f4ebb490e9961;p=emacs.git * lisp/bindings.el: Put `ascii-character' property on keypad keys mapped to characters. Fixes: debbugs:17759 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index db615f68adf..b489b5a50d6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-06-14 Juri Linkov + + * bindings.el: Put `ascii-character' property on keypad keys + mapped to characters. (Bug#17759) + 2014-06-13 Stefan Monnier * emacs-lisp/smie.el (smie-next-sexp): Fix up "other-end" info when diff --git a/lisp/bindings.el b/lisp/bindings.el index 7093b8e662f..59aa3dfb3d3 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -1075,10 +1075,14 @@ if `inhibit-field-text-motion' is non-nil." (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9) (kp-add ?+) (kp-subtract ?-) (kp-multiply ?*) (kp-divide ?/)))) (dolist (pair keys) - (dolist (mod modifiers) - (define-key function-key-map - (vector (append mod (list (nth 0 pair)))) - (vector (append mod (list (nth 1 pair)))))))) + (let ((keypad (nth 0 pair)) + (normal (nth 1 pair))) + (when (characterp normal) + (put keypad 'ascii-character normal)) + (dolist (mod modifiers) + (define-key function-key-map + (vector (append mod (list keypad))) + (vector (append mod (list normal)))))))) (define-key function-key-map [backspace] [?\C-?]) (define-key function-key-map [delete] [?\C-?])