diff src/keymap.c @ 114:8619ce7e4c50 r20-1b9

Import from CVS: tag r20-1b9
author cvs
date Mon, 13 Aug 2007 09:21:54 +0200
parents 4be1180a9e89
children 6b37e6ddd302
line wrap: on
line diff
--- a/src/keymap.c	Mon Aug 13 09:20:50 2007 +0200
+++ b/src/keymap.c	Mon Aug 13 09:21:54 2007 +0200
@@ -2378,8 +2378,11 @@
 
 	      if (!EQ (buffer, Vmouse_grabbed_buffer)) /* already pushed */
 		{
+		  Lisp_Object map = XBUFFER (buffer)->keymap;
+
 		  get_relevant_minor_maps (buffer, &closure);
-		  relevant_map_push (XBUFFER (buffer)->keymap, &closure);
+		  if (!NILP(map))
+		    relevant_map_push (map, &closure);
 		}
 	    }
 	}
@@ -2618,6 +2621,8 @@
   assert (EVENTP (event0));
 
   nmaps = get_relevant_keymaps (event0, countof (maps), maps);
+  if (nmaps > countof (maps))
+    nmaps = countof (maps);
   return (process_event_binding_result
 	  (lookup_events (event0, nmaps, maps, accept_default)));
 }