diff src/octave.cc @ 14614:4e9dc46d4125

handle texinfo macros consistently in help system and manual * macros.texi: New file. Move macro definitions here from octave.texi. * doc/interpreter/Makefile.am (octetc_DATA): Include it in the list. (doc-cache): Pass macros.texi to mk_doc_cache.m. * octave.texi: Include macros.texi. * mk_doc_cache.m, __makeinfo__.m: Copy macros file to makeinfo input instead of handling macros specially. * configure.ac (texi_macros_file): New variable. * build-aux/common.mk (texi_macros_file, do_subst_default_vals): Substitute it. * run-octave.in (TEXIMACROSFILE): New variable. Pass --texi-macros-file to Octave. * defaults.in.h (OCTAVE_DEFAULT_TEXI_MACROS_FILE): New variable. * default.cc (set_default_texi_macros_file): New function. (install_defaults): Call it. * help.cc (Vtexi_macros_file): New variable. (Ftexi_macros_file): New function. * help.h (Vtexi_macros_file): Provide decl. * octave.cc (TEXI_MACROS_FILE_OPTION): New long option value. (long_opts): Include --texi-macros-file in the list. (octave_main): Handle TEXI_MACROS_FILE_OPTION.
author John W. Eaton <jwe@octave.org>
date Thu, 10 May 2012 12:01:42 -0400
parents a459d42bb0a6
children be12c85c6ce7
line wrap: on
line diff
--- a/src/octave.cc	Wed May 09 18:44:58 2012 -0400
+++ b/src/octave.cc	Thu May 10 12:01:42 2012 -0400
@@ -150,7 +150,8 @@
 #define NO_SITE_FILE_OPTION 11
 #define NO_WINDOW_SYSTEM_OPTION 12
 #define PERSIST_OPTION 13
-#define TRADITIONAL_OPTION 14
+#define TEXI_MACROS_FILE_OPTION 14
+#define TRADITIONAL_OPTION 15
 struct option long_opts[] =
   {
     { "braindead",        no_argument,       0, TRADITIONAL_OPTION },
@@ -176,6 +177,7 @@
     { "persist",          no_argument,       0, PERSIST_OPTION },
     { "quiet",            no_argument,       0, 'q' },
     { "silent",           no_argument,       0, 'q' },
+    { "texi-macros-file", required_argument, 0, TEXI_MACROS_FILE_OPTION },
     { "traditional",      no_argument,       0, TRADITIONAL_OPTION },
     { "verbose",          no_argument,       0, 'V' },
     { "version",          no_argument,       0, 'v' },
@@ -534,6 +536,7 @@
   --path PATH, -p PATH    Add PATH to head of function search path.\n\
   --persist               Go interactive after --eval or reading from FILE.\n\
   --silent, -q            Don't print message at startup.\n\
+  --texi-macros-file FILE Use doc cache file FILE.\n\
   --traditional           Set variables for closer MATLAB compatibility.\n\
   --verbose, -V           Enable verbose output in some cases.\n\
   --version, -v           Print version number and exit.\n\
@@ -811,6 +814,11 @@
           persist = true;
           break;
 
+        case TEXI_MACROS_FILE_OPTION:
+          if (optarg)
+            bind_internal_variable ("texi_macros_file", optarg);
+          break;
+
         case TRADITIONAL_OPTION:
           traditional = true;
           break;