texinfo-commits
[Top][All Lists]
Advanced

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

[5680] use info_keymap instead of active_window->keymap


From: Gavin D. Smith
Subject: [5680] use info_keymap instead of active_window->keymap
Date: Fri, 20 Jun 2014 17:27:18 +0000

Revision: 5680
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5680
Author:   gavin
Date:     2014-06-20 17:27:15 +0000 (Fri, 20 Jun 2014)
Log Message:
-----------
use info_keymap instead of active_window->keymap

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/echo-area.c
    trunk/info/infodoc.c
    trunk/info/session.c
    trunk/info/window.c
    trunk/info/window.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-06-20 17:07:57 UTC (rev 5679)
+++ trunk/ChangeLog     2014-06-20 17:27:15 UTC (rev 5680)
@@ -6,6 +6,9 @@
        * info/session.c (info_read_and_dispatch): Special casing for echo area
        removed.
 
+       * info/window.c (WINDOW): Field 'keymap' removed.  All reads or writes
+       changed to use info_keymap or echo_area_keymap directly.
+
 2014-06-20  Gavin Smith  <address@hidden>
 
        * info/session.c (info_set_pending_input): Place argument in

Modified: trunk/info/echo-area.c
===================================================================
--- trunk/info/echo-area.c      2014-06-20 17:07:57 UTC (rev 5679)
+++ trunk/info/echo-area.c      2014-06-20 17:27:15 UTC (rev 5680)
@@ -184,7 +184,7 @@
       info_error_was_printed = 0;
 
       /* Do the selected command. */
-      info_dispatch_on_key (key, active_window->keymap);
+      info_dispatch_on_key (key, echo_area_keymap);
 
       /* Echo area commands that do killing increment the value of
          ECHO_AREA_LAST_COMMAND_WAS_KILL.  Thus, if there is no

Modified: trunk/info/infodoc.c
===================================================================
--- trunk/info/infodoc.c        2014-06-20 17:07:57 UTC (rev 5679)
+++ trunk/info/infodoc.c        2014-06-20 17:27:15 UTC (rev 5680)
@@ -471,10 +471,9 @@
   char keys[50];
   unsigned char keystroke;
   char *k = keys;
-  Keymap map;
+  Keymap map = info_keymap;
 
   *k = '\0';
-  map = window->keymap;
 
   for (;;)
     {
@@ -926,7 +925,7 @@
         {
           char *location;
 
-          location = where_is (active_window->keymap, command);
+          location = where_is (info_keymap, command);
 
           if (!location || !location[0])
             {

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2014-06-20 17:07:57 UTC (rev 5679)
+++ trunk/info/session.c        2014-06-20 17:27:15 UTC (rev 5680)
@@ -185,7 +185,7 @@
       info_error_was_printed = 0;
 
       /* Do the selected command. */
-      info_dispatch_on_key (key, active_window->keymap);
+      info_dispatch_on_key (key, info_keymap);
     }
 }
 
@@ -3917,9 +3917,9 @@
           /* If this key is not a keymap, get its associated function,
              if any.  If it is a keymap, then it's probably ESC from an
              arrow key, and we handle that case below.  */
-          char type = window->keymap[key].type;
+          char type = info_keymap[key].type;
           func = type == ISFUNC
-                 ? InfoFunction(window->keymap[key].function)
+                 ? InfoFunction(info_keymap[key].function)
                  : NULL;  /* function member is a Keymap if ISKMAP */
 
           if (isprint (key) || (type == ISFUNC && func == NULL))
@@ -4621,7 +4621,7 @@
                       _("Internally used by \\[universal-argument]"))
 {
   unsigned char pure_key;
-  Keymap keymap = window->keymap;
+  Keymap keymap;
 
   int *which_numeric_arg, *which_numeric_arg_sign, *which_explicit_arg;
 
@@ -4632,12 +4632,14 @@
       which_explicit_arg =     &info_explicit_arg;
       which_numeric_arg_sign = &info_numeric_arg_sign;
       which_numeric_arg =      &info_numeric_arg;
+      keymap = info_keymap;
     }
   else
     {
       which_explicit_arg =     &ea_explicit_arg;
       which_numeric_arg_sign = &ea_numeric_arg_sign;
       which_numeric_arg =      &ea_numeric_arg;
+      keymap = echo_area_keymap;
     }
 
   while (1)
@@ -4694,4 +4696,3 @@
       key = 0;
     }
 }
-

Modified: trunk/info/window.c
===================================================================
--- trunk/info/window.c 2014-06-20 17:07:57 UTC (rev 5679)
+++ trunk/info/window.c 2014-06-20 17:27:15 UTC (rev 5680)
@@ -78,10 +78,6 @@
   the_echo_area->height = ECHO_AREA_HEIGHT;
   active_window->height = the_screen->height - 1 - the_echo_area->height;
   window_new_screen_size (width, height);
-
-  /* The echo area uses a different keymap than normal info windows. */
-  the_echo_area->keymap = echo_area_keymap;
-  active_window->keymap = info_keymap;
 }
 
 /* Given that the size of the screen has changed to WIDTH and HEIGHT
@@ -282,7 +278,6 @@
   window->height = (active_window->height / 2) - 1;
   window->first_row = active_window->first_row +
     (active_window->height - window->height);
-  window->keymap = info_keymap;
   window->goal_column = 0;
   memset (&window->line_map, 0, sizeof (window->line_map));
   window->modeline = xmalloc (1 + window->width);

Modified: trunk/info/window.h
===================================================================
--- trunk/info/window.h 2014-06-20 17:07:57 UTC (rev 5679)
+++ trunk/info/window.h 2014-06-20 17:27:15 UTC (rev 5680)
@@ -76,7 +76,6 @@
   long height;          /* Height of this window. */
   long first_row;       /* Offset of the first line in the_screen. */
   long goal_column;     /* The column we would like the cursor to appear in. */
-  Keymap keymap;        /* Keymap used to read commands in this window. */
   WINDOW_STATE_DECL;    /* Node, pagetop and point. */
   LINE_MAP line_map;    /* Current line map */
   char *modeline;       /* Calculated text of the modeline for this window. */




reply via email to

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