emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117240: * lisp/bindings.el: Put `ascii-character


From: Juri Linkov
Subject: [Emacs-diffs] emacs-24 r117240: * lisp/bindings.el: Put `ascii-character' property on keypad keys mapped to characters.
Date: Sat, 14 Jun 2014 09:50:19 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117240
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17759
committer: Juri Linkov <address@hidden>
branch nick: emacs-24
timestamp: Sat 2014-06-14 12:50:13 +0300
message:
  * lisp/bindings.el: Put `ascii-character' property on keypad keys mapped to 
characters.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/bindings.el               
bindings.el-20091113204419-o5vbwnq5f7feedwu-1013
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-06-13 15:31:17 +0000
+++ b/lisp/ChangeLog    2014-06-14 09:50:13 +0000
@@ -1,3 +1,8 @@
+2014-06-14  Juri Linkov  <address@hidden>
+
+       * bindings.el: Put `ascii-character' property on keypad keys
+       mapped to characters.  (Bug#17759)
+
 2014-06-13  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/smie.el (smie-next-sexp): Fix up "other-end" info when

=== modified file 'lisp/bindings.el'
--- a/lisp/bindings.el  2014-03-20 17:14:45 +0000
+++ b/lisp/bindings.el  2014-06-14 09:50:13 +0000
@@ -1075,10 +1075,14 @@
              (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-?])


reply via email to

[Prev in Thread] Current Thread [Next in Thread]