emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/keymap.c,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/src/keymap.c,v
Date: Sun, 01 Apr 2007 15:58:29 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      07/04/01 15:58:29

Index: keymap.c
===================================================================
RCS file: /sources/emacs/emacs/src/keymap.c,v
retrieving revision 1.348
retrieving revision 1.349
diff -u -b -r1.348 -r1.349
--- keymap.c    24 Mar 2007 16:23:01 -0000      1.348
+++ keymap.c    1 Apr 2007 15:58:29 -0000       1.349
@@ -2579,15 +2579,6 @@
   /* 1 means ignore all menu bindings entirely.  */
   int nomenus = !NILP (firstonly) && !EQ (firstonly, Qnon_ascii);
 
-  /* If this command is remapped, then it has no key bindings
-     of its own.  */
-  if (NILP (no_remap) && SYMBOLP (definition))
-    {
-      Lisp_Object tem;
-      if (tem = Fcommand_remapping (definition, Qnil), !NILP (tem))
-       return Qnil;
-    }
-
   found = keymaps;
   while (CONSP (found))
     {
@@ -2601,6 +2592,22 @@
   found = Qnil;
   sequences = Qnil;
 
+  /* If this command is remapped, then it has no key bindings
+     of its own.  */
+  if (NILP (no_remap) && SYMBOLP (definition))
+    {
+      Lisp_Object kmaps, map, remap;
+
+      for (kmaps = maps; !NILP (kmaps); kmaps = Fcdr (kmaps))
+       if (map = Fcdr (Fcar (kmaps)), KEYMAPP (map))
+         {
+           ASET (command_remapping_vector, 1, definition);
+           remap = Flookup_key (map, command_remapping_vector, Qnil);
+           if (!NILP (remap) && !INTEGERP (remap))
+             RETURN_UNGCPRO (Qnil);
+         }
+    }
+
   for (; !NILP (maps); maps = Fcdr (maps))
     {
       /* Key sequence to reach map, and the map that it reaches */




reply via email to

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