texinfo-commits
[Top][All Lists]
Advanced

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

[5652] remove info_last_executed_command


From: Gavin D. Smith
Subject: [5652] remove info_last_executed_command
Date: Mon, 09 Jun 2014 10:43:25 +0000

Revision: 5652
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5652
Author:   gavin
Date:     2014-06-09 10:43:24 +0000 (Mon, 09 Jun 2014)
Log Message:
-----------
remove info_last_executed_command

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/session.c
    trunk/info/session.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-06-09 10:33:08 UTC (rev 5651)
+++ trunk/ChangeLog     2014-06-09 10:43:24 UTC (rev 5652)
@@ -1,3 +1,10 @@
+2014-06-09  Gavin Smith  <address@hidden>
+
+       * info/session.c (info_last_executed_command): Removed.
+       (info_session, info_abort_key, info_dispatch_on_key): Don't set
+       info_last_executed_command.
+       (info_search_internal): Comment updated.
+
 2014-06-08  Gavin Smith  <address@hidden>
 
        * info/window.c, info/session.c (window_scroll_step): Moved between

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2014-06-09 10:33:08 UTC (rev 5651)
+++ trunk/info/session.c        2014-06-09 10:43:24 UTC (rev 5652)
@@ -60,9 +60,6 @@
 /* The place that we are reading input from. */
 static FILE *info_input_stream = NULL;
 
-/* The last executed command. */
-VFunction *info_last_executed_command = NULL;
-
 /* Becomes non-zero when 'q' is typed to an Info window. */
 static int quit_info_immediately = 0;
 
@@ -163,7 +160,6 @@
 info_session (void)
 {
   display_update_display (windows);
-  info_last_executed_command = NULL;
   info_read_and_dispatch ();
   /* On program exit, leave the cursor at the bottom of the window, and
      restore the terminal I/O. */
@@ -3308,11 +3304,8 @@
   if (resbnd && resbnd->start != -1)
     start = resbnd->start;
   else
-    /* This used to begin from window->point, unless this was a repeated
-       search command.  But invoking search with an argument loses with
-       that logic, since info_last_executed_command is then set to
-       info_add_digit_to_numeric_arg.  I think there's no sense in
-       ``finding'' a string that is already under the cursor, anyway.  */
+    /* Start just after or before point to avoid ``finding'' a string that
+       is already under the cursor. */
     start = window->point + dir;
   
   result = info_search_in_node_internal
@@ -4262,7 +4255,6 @@
 
   info_initialize_numeric_arg ();
   info_clear_pending_input ();
-  info_last_executed_command = NULL;
 }
 
 DECLARE_INFO_COMMAND (info_info_version, _("Display version of Info being 
run"))
@@ -4502,16 +4494,10 @@
                   key);
 
               /* If we have input pending, then the last command was a prefix
-                 command.  Don't change the value of the last function vars.
-                 Otherwise, remember the last command executed in the var
-                 appropriate to the window in which it was executed. */
-              if (!info_input_pending_p ())
-                {
-                  if (where == the_echo_area)
-                    ea_last_executed_command = InfoFunction(map[key].function);
-                  else
-                    info_last_executed_command = 
InfoFunction(map[key].function);
-                }
+                 command.  Don't change the value of the last function var.
+                 Otherwise, remember the last command executed. */
+              if (where == the_echo_area && !info_input_pending_p ())
+                ea_last_executed_command = InfoFunction(map[key].function);
             }
           }
         else

Modified: trunk/info/session.h
===================================================================
--- trunk/info/session.h        2014-06-09 10:33:08 UTC (rev 5651)
+++ trunk/info/session.h        2014-06-09 10:43:24 UTC (rev 5652)
@@ -34,9 +34,6 @@
 #define DECLARE_INFO_COMMAND(name, doc) \
 void name (WINDOW *window, int count, unsigned char key)
 
-/* Variables found in session.h. */
-extern VFunction *info_last_executed_command;
-
 /* Variable controlling the garbage collection of files briefly visited
    during searches.  Such files are normally gc'ed, unless they were
    compressed to begin with.  If this variable is non-zero, it says




reply via email to

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