emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r107268: * src/keymap.c (Fsingle_key_


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107268: * src/keymap.c (Fsingle_key_description): Handle char ranges.
Date: Mon, 13 Feb 2012 10:55:27 -0500
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107268
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2012-02-13 10:55:27 -0500
message:
  * src/keymap.c (Fsingle_key_description): Handle char ranges.
modified:
  src/ChangeLog
  src/keymap.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-02-12 09:46:33 +0000
+++ b/src/ChangeLog     2012-02-13 15:55:27 +0000
@@ -1,3 +1,7 @@
+2012-02-13  Stefan Monnier  <address@hidden>
+
+       * keymap.c (Fsingle_key_description): Handle char ranges.
+
 2012-02-12  Chong Yidong  <address@hidden>
 
        * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2012-01-19 07:21:25 +0000
+++ b/src/keymap.c      2012-02-13 15:55:27 +0000
@@ -2270,9 +2270,15 @@
   if (CONSP (key) && lucid_event_type_list_p (key))
     key = Fevent_convert_list (key);
 
+  if (CONSP (key) && INTEGERP (XCAR (key)) && INTEGERP (XCDR (key)))
+    /* An interval from a map-char-table.  */
+    return concat3 (Fsingle_key_description (XCAR (key), no_angles),
+                   build_string (".."),
+                   Fsingle_key_description (XCDR (key), no_angles));
+
   key = EVENT_HEAD (key);
 
-  if (INTEGERP (key))          /* Normal character */
+  if (INTEGERP (key))          /* Normal character.  */
     {
       char tem[KEY_DESCRIPTION_SIZE], *p;
 
@@ -2280,7 +2286,7 @@
       *p = 0;
       return make_specified_string (tem, -1, p - tem, 1);
     }
-  else if (SYMBOLP (key))      /* Function key or event-symbol */
+  else if (SYMBOLP (key))      /* Function key or event-symbol.  */
     {
       if (NILP (no_angles))
        {


reply via email to

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