changeset 59522:031c9a79c55a

(Fcurrent_active_maps): Ignore Voverriding_local_map if Voverriding_terminal_local_map is non-nil.
author Richard M. Stallman <rms@gnu.org>
date Thu, 13 Jan 2005 19:49:53 +0000
parents 0a0437db07fc
children 72a78ee72ab9
files src/keymap.c
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Thu Jan 13 19:45:51 2005 +0000
+++ b/src/keymap.c	Thu Jan 13 19:49:53 2005 +0000
@@ -1486,10 +1486,13 @@
 
   if (!NILP (olp))
     {
-      if (!NILP (Voverriding_local_map))
-	keymaps = Fcons (Voverriding_local_map, keymaps);
       if (!NILP (current_kboard->Voverriding_terminal_local_map))
 	keymaps = Fcons (current_kboard->Voverriding_terminal_local_map, keymaps);
+      /* The doc said that overriding-terminal-local-map should
+	 override overriding-local-map.  The code used them both,
+	 but it seems clearer to use just one.  rms, jan 2005.  */
+      else if (!NILP (Voverriding_local_map))
+	keymaps = Fcons (Voverriding_local_map, keymaps);
     }
   if (NILP (XCDR (keymaps)))
     {
@@ -1497,16 +1500,20 @@
       Lisp_Object *maps;
       int nmaps, i;
 
+      /* This usually returns the buffer's local map,
+	 but that can be overridden by a `local-map' property.  */
       local = get_local_map (PT, current_buffer, Qlocal_map);
       if (!NILP (local))
 	keymaps = Fcons (local, keymaps);
 
+      /* Now put all the minor mode keymaps on the list.  */
       nmaps = current_minor_maps (0, &maps);
 
       for (i = --nmaps; i >= 0; i--)
 	if (!NILP (maps[i]))
 	  keymaps = Fcons (maps[i], keymaps);
 
+      /* This returns nil unless there is a `keymap' property.  */
       local = get_local_map (PT, current_buffer, Qkeymap);
       if (!NILP (local))
 	keymaps = Fcons (local, keymaps);