]> code.delx.au - gnu-emacs/blobdiff - src/keyboard.c
Document what does mouse-3 do on the mode line if there's only one window.
[gnu-emacs] / src / keyboard.c
index 9fb91b1229e0c5213782fd6cf0fc110fa062ce85..15c05e8f44e9c324fbef9aeeb38b73178a816962 100644 (file)
@@ -2221,7 +2221,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
       while (!input_pending)
        {
          if (help_echo_showing_p && !EQ (selected_window, minibuf_window))
-           redisplay_preserve_echo_area ();
+           redisplay_preserve_echo_area (5);
          else
            redisplay ();
 
@@ -3039,7 +3039,7 @@ tracking_off (old_value)
         redisplay.  */
       if (!readable_events (1))
        {
-         redisplay_preserve_echo_area ();
+         redisplay_preserve_echo_area (6);
          get_input_pending (&input_pending, 1);
        }
     }
@@ -3810,7 +3810,7 @@ swallow_events (do_display)
   get_input_pending (&input_pending, 1);
 
   if (timers_run != old_timers_run && do_display)
-    redisplay_preserve_echo_area ();
+    redisplay_preserve_echo_area (7);
 }
 \f
 static EMACS_TIME timer_idleness_start_time;
@@ -6303,7 +6303,7 @@ menu_bar_items (old)
       {
        /* No, so use major and minor mode keymaps and keymap property.  */
        int extra_maps = 2;
-       Lisp_Object map = get_local_map (PT, current_buffer, keymap);
+       Lisp_Object map = get_local_map (PT, current_buffer, Qkeymap);
        if (!NILP (map))
          extra_maps = 3;
        nmaps = current_minor_maps (NULL, &tmaps);
@@ -6312,7 +6312,7 @@ menu_bar_items (old)
        bcopy (tmaps, maps, nmaps * sizeof (maps[0]));
        if (!NILP (map))
          maps[nmaps++] = map;
-       maps[nmaps++] = get_local_map (PT, current_buffer, local_map);
+       maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
       }
     maps[nmaps++] = current_global_map;
   }
@@ -6955,7 +6955,7 @@ tool_bar_items (reuse, nitems)
     {
       /* No, so use major and minor mode keymaps and keymap property.  */
       int extra_maps = 2;
-      Lisp_Object map = get_local_map (PT, current_buffer, keymap);
+      Lisp_Object map = get_local_map (PT, current_buffer, Qkeymap);
       if (!NILP (map))
        extra_maps = 3;
       nmaps = current_minor_maps (NULL, &tmaps);
@@ -6964,7 +6964,7 @@ tool_bar_items (reuse, nitems)
       bcopy (tmaps, maps, nmaps * sizeof (maps[0]));
       if (!NILP (map))
        maps[nmaps++] = map;
-      maps[nmaps++] = get_local_map (PT, current_buffer, local_map);
+      maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
     }
 
   /* Add global keymap at the end.  */
@@ -7884,8 +7884,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
                           &junk);
 #endif /* GOBBLE_FIRST_EVENT */
 
-  orig_local_map = get_local_map (PT, current_buffer, local_map);
-  orig_keymap = get_local_map (PT, current_buffer, keymap);
+  orig_local_map = get_local_map (PT, current_buffer, Qlocal_map);
+  orig_keymap = get_local_map (PT, current_buffer, Qkeymap);
 
   /* We jump here when the key sequence has been thoroughly changed, and
      we need to rescan it starting from the beginning.  When we jump here,
@@ -8054,8 +8054,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
                               interrupted_kboard->kbd_queue);
                  }
                mock_input = 0;
-               orig_local_map = get_local_map (PT, current_buffer, local_map);
-               orig_keymap = get_local_map (PT, current_buffer, keymap);
+               orig_local_map = get_local_map (PT, current_buffer, Qlocal_map);
+               orig_keymap = get_local_map (PT, current_buffer, Qkeymap);
                goto replay_sequence;
              }
 #endif
@@ -8101,8 +8101,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
                    Fset_buffer (XWINDOW (selected_window)->buffer);
                }
 
-             orig_local_map = get_local_map (PT, current_buffer, local_map);
-             orig_keymap = get_local_map (PT, current_buffer, keymap);
+             orig_local_map = get_local_map (PT, current_buffer, Qlocal_map);
+             orig_keymap = get_local_map (PT, current_buffer, Qkeymap);
              goto replay_sequence;
            }
 
@@ -8116,8 +8116,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
              keybuf[t++] = key;
              mock_input = t;
              Vquit_flag = Qnil;
-             orig_local_map = get_local_map (PT, current_buffer, local_map);
-             orig_keymap = get_local_map (PT, current_buffer, keymap);
+             orig_local_map = get_local_map (PT, current_buffer, Qlocal_map);
+             orig_keymap = get_local_map (PT, current_buffer, Qkeymap);
              goto replay_sequence;
            }
 
@@ -8202,12 +8202,10 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
 
                  if (! FRAME_LIVE_P (XFRAME (selected_frame)))
                    Fkill_emacs (Qnil);
-                 set_buffer_internal (XBUFFER (XWINDOW
-                 (window)->buffer)
-);
+                 set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
                  orig_local_map = get_local_map (PT, current_buffer,
-                                                 local_map);
-                 orig_keymap = get_local_map (PT, current_buffer, keymap);
+                                                 Qlocal_map);
+                 orig_keymap = get_local_map (PT, current_buffer, Qkeymap);
                  goto replay_sequence;
                }
              
@@ -8229,7 +8227,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
                          && XINT (pos) >= BEG && XINT (pos) <= Z)
                        {
                          map_here = get_local_map (XINT (pos),
-                                                   current_buffer, local_map);
+                                                   current_buffer, Qlocal_map);
                          if (!EQ (map_here, orig_local_map))
                            {
                              orig_local_map = map_here;
@@ -8239,7 +8237,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
                              goto replay_sequence;
                            }
                          map_here = get_local_map (XINT (pos),
-                                                    current_buffer, keymap);
+                                                    current_buffer, Qkeymap);
                          if (!EQ (map_here, orig_keymap))
                            {
                              orig_keymap = map_here;
@@ -9070,6 +9068,8 @@ a special event, so ignore the prefix argument and don't clear it.")
     }
   return Qnil;
 }
+
+
 \f
 DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_command,
   1, 1, "P",
@@ -9192,7 +9192,9 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
          Lisp_Object binding;
          char *newmessage;
          int message_p = push_message ();
+         int count = BINDING_STACK_SIZE ();
 
+         record_unwind_protect (push_message_unwind, Qnil);
          binding = Fkey_description (bindings);
 
          newmessage
@@ -9211,7 +9213,7 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
              && message_p)
            restore_message ();
 
-         pop_message ();
+         unbind_to (count, Qnil);
        }
     }
 
@@ -9245,7 +9247,7 @@ current_active_maps (maps_p)
     {
       /* No, so use major and minor mode keymaps and keymap property.  */
       int extra_maps = 2;
-      Lisp_Object map = get_local_map (PT, current_buffer, keymap);
+      Lisp_Object map = get_local_map (PT, current_buffer, Qkeymap);
       if (!NILP (map))
        extra_maps = 3;
       nmaps = current_minor_maps (NULL, &tmaps);
@@ -9254,7 +9256,7 @@ current_active_maps (maps_p)
       bcopy (tmaps, maps, nmaps * sizeof (maps[0]));
       if (!NILP (map))
        maps[nmaps++] = map;
-      maps[nmaps++] = get_local_map (PT, current_buffer, local_map);
+      maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
     }
   maps[nmaps++] = current_global_map;
 
@@ -9286,7 +9288,7 @@ detect_input_pending_run_timers (do_display)
 
   if (old_timers_run != timers_run && do_display)
     {
-      redisplay_preserve_echo_area ();
+      redisplay_preserve_echo_area (8);
       /* The following fixes a bug when using lazy-lock with
         lazy-lock-defer-on-the-fly set to t, i.e.  when fontifying
         from an idle timer function.  The symptom of the bug is that