]> code.delx.au - gnu-emacs/commitdiff
* lisp/bindings.el: Put `ascii-character' property on keypad keys mapped to characters.
authorJuri Linkov <juri@jurta.org>
Sat, 14 Jun 2014 09:50:13 +0000 (12:50 +0300)
committerJuri Linkov <juri@jurta.org>
Sat, 14 Jun 2014 09:50:13 +0000 (12:50 +0300)
Fixes: debbugs:17759
lisp/ChangeLog
lisp/bindings.el

index db615f68adff6d04595f79304eb021216965619e..b489b5a50d6423f25e7c035decf8f249a42de4b1 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-14  Juri Linkov  <juri@jurta.org>
+
+       * bindings.el: Put `ascii-character' property on keypad keys
+       mapped to characters.  (Bug#17759)
+
 2014-06-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/smie.el (smie-next-sexp): Fix up "other-end" info when
index 7093b8e662f1221275c02eb797b35abb0977cb7d..59aa3dfb3d3c9cf1e825607759769608d51e8cb6 100644 (file)
@@ -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-?])