On Dec 31, 2007 8:57 PM, Ben Asselstine <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Here's a patch that adds -k to `info' as an alias for the --apropos
> option.

Whoops.  Try #2.

regards,

Ben
diff -uNrd texinfo.orig/doc/info-stnd.texi texinfo/doc/info-stnd.texi
--- texinfo.orig/doc/info-stnd.texi	2007-12-29 20:35:48.000000000 -0500
+++ texinfo/doc/info-stnd.texi	2007-12-31 20:44:16.000000000 -0500
@@ -132,6 +132,7 @@
 @table @code
 @anchor{--apropos}
 @item [EMAIL PROTECTED]
[EMAIL PROTECTED] -k @var{string}
 @cindex Searching all indices
 @cindex Info [EMAIL PROTECTED], searching all indices}
 @cindex [EMAIL PROTECTED], in Info files}
diff -uNrd texinfo.orig/info/info.c texinfo/info/info.c
--- texinfo.orig/info/info.c	2007-12-29 20:35:49.000000000 -0500
+++ texinfo/info/info.c	2007-12-31 21:09:18.000000000 -0500
@@ -94,12 +94,11 @@
 /* Structure describing the options that Info accepts.  We pass this structure
    to getopt_long ().  If you add or otherwise change this structure, you must
    also change the string which follows it. */
-#define APROPOS_OPTION 1
 #define DRIBBLE_OPTION 2
 #define RESTORE_OPTION 3
 #define IDXSRCH_OPTION 4
 static struct option long_options[] = {
-  { "apropos", 1, 0, APROPOS_OPTION },
+  { "apropos", 1, 0, 'k' },
   { "directory", 1, 0, 'd' },
   { "dribble", 1, 0, DRIBBLE_OPTION },
   { "file", 1, 0, 'f' },
@@ -125,9 +124,9 @@
 
 /* String describing the shorthand versions of the long options found above. */
 #ifdef __MSDOS__
-static char *short_options = "d:n:f:ho:ORswb";
+static char *short_options = "d:n:f:ho:ORswbk";
 #else
-static char *short_options = "d:n:f:ho:ORws";
+static char *short_options = "d:n:f:ho:ORwsk";
 #endif
 
 /* When non-zero, the Info window system has been initialized. */
@@ -246,7 +245,7 @@
 #endif /* __MSDOS__ */
 
           /* User has specified a string to search all indices for. */
-        case APROPOS_OPTION:
+        case 'k':
           apropos_p = 1;
           maybe_free (apropos_search_string);
           apropos_search_string = xstrdup (optarg);
@@ -603,7 +602,7 @@
 Read documentation in Info format.\n\
 \n\
 Options:\n\
-      --apropos=STRING         look up STRING in all indices of all manuals.\n\
+  -k, --apropos=STRING         look up STRING in all indices of all manuals.\n\
   -d, --directory=DIR          add DIR to INFOPATH.\n\
       --dribble=FILENAME       remember user keystrokes in FILENAME.\n\
   -f, --file=FILENAME          specify Info file to visit.\n\

Reply via email to