aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2014-06-14 12:50:13 +0300
committerJuri Linkov2014-06-14 12:50:13 +0300
commit5be5f2854a9105e65679ef6af87f4ebb490e9961 (patch)
tree24a199f7aac15546266c8e5e83eae74101d55f3b
parent78275cd0ed1816e67f0fb331b4ebca4aac5d1cc7 (diff)
downloademacs-5be5f2854a9105e65679ef6af87f4ebb490e9961.tar.gz
emacs-5be5f2854a9105e65679ef6af87f4ebb490e9961.zip
* lisp/bindings.el: Put `ascii-character' property on keypad keys mapped to characters.
Fixes: debbugs:17759
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/bindings.el12
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index db615f68adf..b489b5a50d6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-06-14 Juri Linkov <juri@jurta.org>
2
3 * bindings.el: Put `ascii-character' property on keypad keys
4 mapped to characters. (Bug#17759)
5
12014-06-13 Stefan Monnier <monnier@iro.umontreal.ca> 62014-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * emacs-lisp/smie.el (smie-next-sexp): Fix up "other-end" info when 8 * 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."
1075 (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9) 1075 (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9)
1076 (kp-add ?+) (kp-subtract ?-) (kp-multiply ?*) (kp-divide ?/)))) 1076 (kp-add ?+) (kp-subtract ?-) (kp-multiply ?*) (kp-divide ?/))))
1077 (dolist (pair keys) 1077 (dolist (pair keys)
1078 (dolist (mod modifiers) 1078 (let ((keypad (nth 0 pair))
1079 (define-key function-key-map 1079 (normal (nth 1 pair)))
1080 (vector (append mod (list (nth 0 pair)))) 1080 (when (characterp normal)
1081 (vector (append mod (list (nth 1 pair)))))))) 1081 (put keypad 'ascii-character normal))
1082 (dolist (mod modifiers)
1083 (define-key function-key-map
1084 (vector (append mod (list keypad)))
1085 (vector (append mod (list normal))))))))
1082 1086
1083(define-key function-key-map [backspace] [?\C-?]) 1087(define-key function-key-map [backspace] [?\C-?])
1084(define-key function-key-map [delete] [?\C-?]) 1088(define-key function-key-map [delete] [?\C-?])