all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Eli Barzilay <eli@barzilay.org>
Cc: 17759@debbugs.gnu.org
Subject: bug#17759: 24.4.50; Missing 'ascii-character props
Date: Fri, 13 Jun 2014 09:30:13 +0300	[thread overview]
Message-ID: <87mwdhe2yw.fsf@mail.jurta.org> (raw)
In-Reply-To: <21401.33221.770115.718905@home.barzilay.org> (Eli Barzilay's message of "Thu, 12 Jun 2014 06:32:37 -0400")

> In the current development version this:
>
>     (get 'kp-7 'ascii-character)
>
> no longer works.  It seems to have been removed in what git shows as
> revision 7f3c6d9a:
>
>   Author: Juri Linkov <juri@jurta.org>
>   Date:   2013-12-13 03:03:04 +0200
>
>   * lisp/simple.el <Keypad support>: Remove key bindings duplicated
>     with bindings.el.
>
> Perhaps the intention is to use only key definitions as the mappings,
> but there is surely code that broke with the change.  (At least
> "calculator.el" did, but I'll fix it if it was intentional.)

Thanks for noticing.  This should be fixed by this patch:

=== modified file 'lisp/bindings.el'
--- lisp/bindings.el	2014-03-20 17:14:45 +0000
+++ lisp/bindings.el	2014-06-13 06:30:04 +0000
@@ -1076,9 +1076,13 @@ (let ((modifiers '(nil (control) (meta)
 	      (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 (and (characterp normal) (eq (char-charset normal) 'ascii))
+	  (put keypad 'ascii-character normal))
+	(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	other threads:[~2014-06-13  6:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 10:32 bug#17759: 24.4.50; Missing 'ascii-character props Eli Barzilay
2014-06-13  6:30 ` Juri Linkov [this message]
2014-06-13 12:46   ` Stefan Monnier
2014-06-14  9:50     ` Juri Linkov
2014-06-14 21:15       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mwdhe2yw.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=17759@debbugs.gnu.org \
    --cc=eli@barzilay.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.