home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / OLEO130S.ZIP / oleo130s.tar / oleo-1.3 / defun.h < prev    next >
C/C++ Source or Header  |  1993-03-31  |  66KB  |  2,259 lines

  1.  
  2. #if 0
  3. DEFUN ("enter-string-in-cell",
  4.        FDenter_string_in_cell, FAenter_string_in_cell, 0) /* fixme */
  5. #ifdef FUNC_ARG_STRINGS
  6. "sEnter string for %c? ",
  7. #endif
  8. #ifdef DOC_STRINGS
  9. "Quote STRING appropriately and store it in the current cell.",
  10. "Called interactively, this is a way to store a string in a cell without",
  11. "having to enclose it in quotes.",
  12. #endif
  13. #endif /* NOT USED */
  14.  
  15. /* squeek squeek */
  16. DEFUN_3 ("mouse-goto", FDmouse_goto, mouse_goto_cmd)
  17. DEFUN_3 ("mouse-mark", FDmouse_mark, mouse_mark_cmd)
  18. DEFUN_3 ("mouse-mark-and-goto",
  19.      FDmouse_mark_and_goto_cmd, mouse_mark_and_goto_cmd)
  20.  
  21. #if 0
  22. DEFUN ("sort-region", "tj", sort_region_cmd)
  23. #endif
  24.     
  25.  
  26.  
  27.  
  28. DEFUN_3 ("exit-minibuffer", FDexit_minibuffer, exit_minibuffer)
  29. #ifdef DOC_STRINGS
  30. "Terminate this minibuffer argument.",
  31. "If no valid argument has been given, an error is reported.",
  32. #endif
  33.  
  34. DEFUN_3 ("break",  FDbreak, 0)
  35. #ifdef DOC_STRINGS
  36. "Abort the current complex command or incomplete keysequence.",
  37. #endif
  38.  
  39.  
  40. DEFUN_3 ("universal-argument", FDuniversal_argument, 0)
  41. #ifdef DOC_STRINGS
  42. "Begin a numeric argument for the following command.",
  43. "Digits or minus sign following this command make up the numeric argument.",
  44. "If no digits or minus sign follow, this by itself provides 4 as argument.",
  45. "Used more than once, this command multiplies the argument by 4 each time.",
  46. #endif
  47.  
  48.  
  49. DEFUN ("kill-oleo", FDkill_oleo, FAkill_oleo, kill_oleo)
  50. #ifdef FUNC_ARG_STRINGS
  51. "MSpreadsheet modified.  Quit without saving? (yes or no) ",
  52. #endif
  53. #ifdef DOC_STRINGS
  54. "Kill this Oleo.  This does NOT save any files.",
  55. #endif
  56.  
  57. DEFUN_3 ("redraw-screen", FDredraw_screen, redraw_screen)
  58. #ifdef DOC_STRINGS
  59. "Center the cell cursor in the current window and redisplay the screen.",
  60. #endif
  61.  
  62. DEFUN_3 ("suspend-oleo", FDsuspend_oleo, suspend_oleo)
  63. #ifdef DOC_STRINGS
  64. "Stop Oleo and return to it's superior process.  Oleo may be resumed.",
  65. #endif
  66.  
  67.  
  68. DEFUN ("recalculate", FDrecalculate, FArecalculate, recalculate)
  69. #ifdef FUNC_ARG_STRINGS
  70. "p?",
  71. #endif
  72. #ifdef DOC_STRINGS
  73. "Recompute any cells that need it.  With a prefix arg, recompute all cells.",
  74. #endif
  75.  
  76. DEFUN ("execute-command",
  77.        FDexecute_command, FAexecute_command, execute_command)
  78. #ifdef FUNC_ARG_STRINGS
  79. "CM-x ",
  80. #endif
  81. #ifdef DOC_STRINGS
  82. "Read command name, then read its arguments and call it.",
  83. #endif
  84.  
  85. DEFUN ("with-keymap", FAwith_keymap, FDwith_keymap, with_keymap)
  86. #ifdef FUNC_ARG_STRINGS
  87. "SWith which keymap? ",
  88. "m%0",
  89. #endif
  90. #ifdef DOC_STRINGS
  91. "Create a user context in which KEYMAP is the top level keymap.",
  92. "Commands will be read in the context until an exit-minibuffer or",
  93. "break command is executed.",
  94. #endif
  95.  
  96. DEFUN ("one-command-with-keymap", FAone_cmd_with_keymap,
  97.        FDone_cmd_with_keymap, one_cmd_with_keymap)
  98. #ifdef FUNC_ARG_STRINGS
  99. "SWith which keymap? ",
  100. "m'%0",
  101. #endif
  102. #ifdef DOC_STRINGS
  103. "Create a user context in which KEYMAP is the top level keymap.",
  104. "Commands will be read in the context until an exit-minibuffer or",
  105. "break command is executed.",
  106. #endif
  107.  
  108.  
  109.  
  110.  
  111.   /* By convention, motion and scrolling commands take a magic number
  112.    * as their first argument.  The number tells which direction to move.
  113.    * 0 == up, 1 == down, etc.
  114.    */
  115. DEFUN ("up-cell", FDup_cell, FAup_cell, shift_cell_cursor)
  116. #ifdef FUNC_ARG_STRINGS
  117. "+#0",
  118. "p",
  119. #endif
  120. #ifdef DOC_STRINGS
  121. "Move cursor up ARG rows.",
  122. #endif
  123. DEFUN ("down-cell", FDdown_cell, FAdown_cell, shift_cell_cursor)
  124. #ifdef FUNC_ARG_STRINGS
  125. "+#1",
  126. "p",
  127. #endif
  128. #ifdef DOC_STRINGS
  129. "Move cursor down ARG rows.",
  130. #endif
  131. DEFUN ("right-cell", FDright_cell, FAright_cell, shift_cell_cursor)
  132. #ifdef FUNC_ARG_STRINGS
  133. "+#2",
  134. "p",
  135. #endif
  136. #ifdef DOC_STRINGS
  137. "Move cursor right ARG cols.",
  138. #endif
  139. DEFUN ("left-cell", FDleft_cell, FAleft_cell, shift_cell_cursor)
  140. #ifdef FUNC_ARG_STRINGS
  141. "+#3",
  142. "p",
  143. #endif
  144. #ifndef fnord
  145. #define fnord    0
  146. #endif
  147. #ifdef DOC_STRINGS
  148. "Move cursor left ARG cols.",
  149. #endif
  150. DEFUN ("upright-cell", FDupright_cell, FAupright_cell, shift_cell_cursor)
  151. #ifdef FUNC_ARG_STRINGS
  152. "+#4",
  153. "p",
  154. #endif
  155. #ifdef DOC_STRINGS
  156. "Move cursor upright ARG rows and cols.",
  157. #endif
  158. DEFUN ("upleft-cell", FDupleft_cell, FAupleft_cell, shift_cell_cursor)
  159. #ifdef FUNC_ARG_STRINGS
  160. "+#5",
  161. "p",
  162. #endif
  163. #ifdef DOC_STRINGS
  164. "Move cursor upleft ARG rows and cols.",
  165. #endif
  166. DEFUN ("downright-cell", FDdownright_cell, FAdownright_cell, shift_cell_cursor)
  167. #ifdef FUNC_ARG_STRINGS
  168. "+#6",
  169. "p",
  170. #endif
  171. #ifdef DOC_STRINGS
  172. "Move cursor downright ARG rows and cols.",
  173. #endif
  174. DEFUN ("downleft-cell", FDdownleft_cell, FAdownleft_cell, shift_cell_cursor)
  175. #ifdef FUNC_ARG_STRINGS
  176. "+#7",
  177. "p",
  178. #endif
  179. #ifdef DOC_STRINGS
  180. "Move cursor downleft ARG rows and cols.",
  181. #endif
  182.  
  183.  
  184.  
  185. DEFUN ("goto-cell", FDgoto_cell, FAgoto_cell, goto_cell)
  186. #ifdef FUNC_ARG_STRINGS
  187. "RGoto cell? ",
  188. #endif
  189. #ifdef DOC_STRINGS
  190. "Goto CELL by name.  If a region is given, the upper-left corner is used.",
  191. #endif
  192.  
  193. DEFUN ("goto-region", FDgoto_region, FAgoto_region, goto_region)
  194. #ifdef FUNC_ARG_STRINGS
  195. "RGoto region? ",
  196. #endif
  197. #ifdef DOC_STRINGS
  198. "Select REGION by name.",
  199. "The cell cursor is moved to the upper left corner, and the mark is placed",
  200. "at the lower right.",
  201. #endif
  202.  
  203.  
  204.  
  205. /* Some interestingly extreme commands. */
  206.  
  207. DEFUN_3 ("upper-left", FDupper_left, upper_left)
  208. #ifdef DOC_STRINGS
  209. "Move the cell cursor to the first row and column.",
  210. #endif
  211.  
  212. DEFUN_3 ("lower-left", FDlower_left, lower_left)
  213. #ifdef DOC_STRINGS
  214. "Move the cell cursor to the last filled row and first column.",
  215. #endif
  216.  
  217. DEFUN_3 ("upper-right", FDupper_right, upper_right)
  218. #ifdef DOC_STRINGS
  219. "Move the cell cursor to the first row and rightmost filled column.",
  220. #endif
  221.  
  222. DEFUN_3 ("lower-right", FDlower_right, lower_right)
  223. #ifdef DOC_STRINGS
  224. "Move the cell cursor to the last filled row and column.",
  225. #endif
  226.  
  227. DEFUN ("exchange-point-and-mark", FDexchange_point_and_mark,
  228.        FAexchange_point_and_mark, exchange_point_and_mark)
  229. #ifdef FUNC_ARG_STRINGS
  230. "p?",
  231. #endif
  232. #ifdef DOC_STRINGS
  233. "Mark the current cell, but move the cell cursor to where the mark is now.",
  234. "With a prefix argument, the mark is cleared the the cell curor remains where",
  235. "it is.",
  236. #endif
  237.  
  238. DEFUN ("mark-cell", FDmark_cell_cmd, FAmark_cell_cmd, mark_cell_cmd)
  239. #ifdef FUNC_ARG_STRINGS
  240. "p?",
  241. #endif
  242. #ifdef DOC_STRINGS
  243. "Mark the current cell. With a prefix arg, pop the mark.",
  244. #endif
  245.  
  246. DEFUN_3 ("clear-mark", FDclear_mark, unmark_cmd)
  247. #ifdef DOC_STRINGS
  248. "Unset the mark.",
  249. #endif
  250.  
  251.  
  252.  
  253. DEFUN ("scroll-up", FDscroll_up, FAscroll_up, scroll_cell_cursor)
  254. #ifdef FUNC_ARG_STRINGS
  255. "+#0",
  256. "p",
  257. #endif
  258. #ifdef DOC_STRINGS
  259. "Scroll the current window up ARG rows; or near full screen if no ARG.",
  260. #endif
  261. DEFUN ("scroll-down", FDscroll_down, FAscroll_down, scroll_cell_cursor)
  262. #ifdef FUNC_ARG_STRINGS
  263. "+#1",
  264. "p",
  265. #endif
  266. #ifdef DOC_STRINGS
  267. "Scroll the current window down ARG rows; or near full screen if no ARG.",
  268. #endif
  269. DEFUN ("scroll-right", FDscroll_right, FAscroll_right, scroll_cell_cursor)
  270. #ifdef FUNC_ARG_STRINGS
  271. "+#2",
  272. "p",
  273. #endif
  274. #ifdef DOC_STRINGS
  275. "Scroll the current window right ARG cols; or near full screen if no ARG.",
  276. #endif
  277. DEFUN ("scroll-left", FDscroll_left, FAscroll_left, scroll_cell_cursor)
  278. #ifdef FUNC_ARG_STRINGS
  279. "+#3",
  280. "p",
  281. #endif
  282. #ifdef DOC_STRINGS
  283. "Scroll the current window left ARG cols; or near full screen if no ARG.",
  284. #endif
  285. DEFUN ("scroll-upright", FDscroll_upright, FAscroll_upright,
  286.        scroll_cell_cursor)
  287. #ifdef FUNC_ARG_STRINGS
  288. "+#4",
  289. "p",
  290. #endif
  291. #ifdef DOC_STRINGS
  292. "Scroll the current window upright ARG row/cols; or a full screen if no ARG.",
  293. #endif
  294. DEFUN ("scroll-upleft", FDscroll_upleft, FAscroll_upleft, scroll_cell_cursor)
  295. #ifdef FUNC_ARG_STRINGS
  296. "+#5",
  297. "p",
  298. #endif
  299. #ifdef DOC_STRINGS
  300. "Scroll the current window upleft ARG row/cols; or full screen if no ARG.",
  301. #endif
  302. DEFUN ("scroll-downright", FDscroll_downright, FAscroll_downright,
  303.        scroll_cell_cursor) 
  304. #ifdef FUNC_ARG_STRINGS
  305. "+#6",
  306. "p",
  307. #endif
  308. #ifdef DOC_STRINGS
  309. "Scroll the current window downright ARG row/cols; or a full screen w/no ARG.",
  310. #endif
  311. DEFUN ("scroll-downleft", FDscroll_downleft, FAscroll_downleft,
  312.        scroll_cell_cursor) 
  313. #ifdef FUNC_ARG_STRINGS
  314. "+#7",
  315. "p",
  316. #endif
  317. #ifdef DOC_STRINGS
  318. "Scroll the current window downleft ARG row/cols; or a full screen if no ARG.",
  319. #endif
  320.  
  321.  
  322. DEFUN ("scan-up", FDscan_up, FAscan_up, scan_cell_cursor)
  323. #ifdef FUNC_ARG_STRINGS
  324. "+#0",
  325. "p",
  326. #endif
  327. #ifdef DOC_STRINGS
  328. "Move up to the next border between filled and empty cells.",
  329. "With an argument, moves to the Nth border.",
  330. #endif
  331. DEFUN ("scan-down", FDscan_down, FAscan_down, scan_cell_cursor)
  332. #ifdef FUNC_ARG_STRINGS
  333. "+#1",
  334. "p",
  335. #endif
  336. #ifdef DOC_STRINGS
  337. "Move down to the next border between filled and empty cells.",
  338. "With an argument, moves to the Nth border.",
  339. #endif
  340. DEFUN ("scan-right", FDscan_right, FAscan_right, scan_cell_cursor)
  341. #ifdef FUNC_ARG_STRINGS
  342. "+#2",
  343. "p",
  344. #endif
  345. #ifdef DOC_STRINGS
  346. "Move right to the next border between filled and empty cells.",
  347. "With an argument, moves to the Nth border.",
  348. #endif
  349. DEFUN ("scan-left", FDscan_left, FAscan_left, scan_cell_cursor)
  350. #ifdef FUNC_ARG_STRINGS
  351. "+#3",
  352. "p",
  353. #endif
  354. #ifdef DOC_STRINGS
  355. "Move left to the next border between filled and empty cells.",
  356. "With an argument, moves to the Nth border.",
  357. #endif
  358.  
  359.  
  360. DEFUN ("beginning-of-row",
  361.        FDbeginning_of_row, FAbeginning_of_row, beginning_of_row)
  362. #ifdef FUNC_ARG_STRINGS
  363. "p",
  364. #endif
  365. #ifdef DOC_STRINGS
  366. "Move point to beginning of the current row.",
  367. "With a prefix argument, move forward ARG - 1 rows first.",
  368. #endif
  369. DEFUN ("beginning-of-col",
  370.        FDbeginning_of_col, FAbeginning_of_col, beginning_of_col)
  371. #ifdef FUNC_ARG_STRINGS
  372. "p",
  373. #endif
  374. #ifdef DOC_STRINGS
  375. "Move point to beginning of the current col.",
  376. "With a prefix argument, move forward ARG - 1 cols first.",
  377. #endif
  378.  
  379. DEFUN ("end-of-row", FDend_of_row, FAend_of_row, end_of_row)
  380. #ifdef FUNC_ARG_STRINGS
  381. "p",
  382. #endif
  383. #ifdef DOC_STRINGS
  384. "Move point to end of the current row.",
  385. "With a prefix argument, move forward ARG - 1 rows first.",
  386. #endif
  387. DEFUN ("end-of-col", FDend_of_col, FAend_of_col, end_of_col)
  388. #ifdef FUNC_ARG_STRINGS
  389. "p",
  390. #endif
  391. #ifdef DOC_STRINGS
  392. "Move point to end of the current col.",
  393. "With a prefix argument, move forward ARG - 1 cols first.",
  394. #endif
  395.  
  396.  
  397.   
  398. DEFUN_3 ("start-entering-macro", FDstart_entering_macro, start_entering_macro)
  399. #ifdef DOC_STRINGS
  400. "Record subsequent keyboard input, defining a keyboard macro.",
  401. "The commands are recorded even as they are executed.",
  402. "Use [stop-entering-macro] to finish recording and make the macro available.",
  403. "Use [store-last-macro] to record the macro in a spreadsheet cell.",
  404. #if 0
  405. Should support this:
  406. Non-nil arg (prefix arg) means append to last macro defined;
  407. This begins by re-executing that macro as if you typed it again.
  408. #endif
  409. #endif
  410.  
  411. DEFUN_3 ("stop-entering-macro", FDstop_entering_macro, stop_entering_macro)
  412. #ifdef DOC_STRINGS
  413. "Finish defining a keyboard macro.",
  414. "The definition was started by [start-entering-macro]",
  415. "The macro is now available for use via [call-last-kbd-macro]",
  416. "or it can be given a name with [store_last_macro] and then invoked",
  417. "by passing it's cell address to [execute-command].",
  418. #if 0
  419. "With numeric arg, repeat macro now that many times,",
  420. "counting the definition just completed as the first repetition.",
  421. #endif
  422. #endif
  423.  
  424. DEFUN ("call-last-kbd-macro", FDcall_last_kbd_macro,
  425.        FAcall_last_kbd_macro, call_last_kbd_macro)
  426. #ifdef FUNC_ARG_STRINGS
  427. "p",
  428. #endif
  429. #ifdef DOC_STRINGS
  430. "Call the last keyboard macro that you defined with [start-entering-macro].",
  431. "To make a macro permanent so you can call it even after",
  432. "defining others, use [store-last-kbd-macro].",
  433. #endif
  434.  
  435. DEFUN_3 ("end-macro", FDend_macro, end_macro)
  436. #ifdef DOC_STRINGS
  437. "This function is for internal use only.",
  438. "Oleo executes this command as part of the process of executing a kbd  macro.",
  439. #endif
  440.  
  441. DEFUN ("store-last-macro",
  442.        FDstore_last_macro, FAstore_last_macro, store_last_macro) 
  443. #ifdef FUNC_ARG_STRINGS
  444. "rStore at? ",
  445. #endif
  446. #ifdef DOC_STRINGS
  447. "Saves the most recently defined keyboard macro in a spreadsheet cell.",
  448. "The sole argument is the cell address at which to store the macro.",
  449. "Thereafter, that cell address is a valid argument to [execute-command].",
  450. #endif
  451.  
  452. DEFUN ("run-string-as-macro",
  453.        FDrun_string_as_macro, FArun_string_as_macro, run_string_as_macro)
  454. #ifdef FUNC_ARG_STRINGS
  455. "sRun macro string: "
  456. "p",
  457. #endif
  458. #ifdef DOC_STRINGS
  459. "Execute STRING as a keyboard macro PREFIX times.",
  460. #endif
  461.  
  462. DEFUN ("name-macro-string",
  463.        FDname_macro_string, FAname_macro_string, name_macro_string)
  464. #ifdef FUNC_ARG_STRINGS
  465. "SName for macro? ",
  466. "sMacro %s? ",
  467. #endif
  468. #ifdef DOC_STRINGS
  469. "Assign NAME to MACRO.",
  470. "The name functions like any interactive command name.",
  471. "When invoked, the command executes the macro string, using the prefix",
  472. "as a repeat count.",
  473. #endif
  474.  
  475.  
  476.  
  477. DEFUN_3 ("show-options", FDshow_options, show_options)
  478. #ifdef DOC_STRINGS
  479. "Show the current state of all the spreadsheet options.",
  480. "Also shows the current definitions for all the user-defined variables.",
  481. #endif
  482.  
  483. DEFUN ("set-option", FDset_option, FAset_option, set_options)
  484. #ifdef FUNC_ARG_STRINGS
  485. "sSet option? ",
  486. #endif
  487. #ifdef DOC_STRINGS
  488. "Change the value of a user-controlled option.",
  489. "",
  490. "Currently Supported Options:",
  491. "",
  492. "(no)a0        In a0 mode, Oleo uses cell-addresses like `A1'.",
  493. "        In noa0 mode, Oleo uses `R1C1' style addresses.",
  494. "",
  495. "(no)auto    In auto mode, cells whose values may have chaged are",
  496. "        automatically recalculated.  In noauto mode, cells are only",
  497. "        recalculated when the recalculate command is used.",
  498. "",
  499. "(no)background    In background mode, automatic recalculation is done while",
  500. "(no)bkgrnd    the spreadsheet waits for you to type a key (and stops while",
  501. "        the key is being handled).  In nobackground mode, Oleo",
  502. "        performs all its recalculation before listening for",
  503. "        keystrokes.",
  504. "",
  505. "(no)backup    In backup mode, whenever the spreadsheet writes out a file,",
  506. "        if the file already exists, a backup copy is made (similarly",
  507. "        to Emacs).",
  508. "",
  509. "(no)bkup_copy    In nobackup mode bkup_copy is ignored.  In bkup_copy mode,",
  510. "        backup files are made by copying the original file, instead",
  511. "        of renaming it.",
  512. "",
  513. "ticks (number)    This value controls how often, in seconds, time-dependant",
  514. "        formulas are reevaluated.",
  515. "",
  516. "print (number)    This is the width of the page for the print command.",
  517. "        The default value is the width of the screen.",
  518. "",
  519. "file (format-name)  This sets format Oleo will use when reading and writing",
  520. "        spreadsheet files.  Valid format names are:",
  521. "         oleo        - The default (and supported) format.",
  522. "         sylk        - A partial implementation of a std. format.",
  523. "         sc        - partial SC compatability.  This is buggy.",
  524. "         list        - An ascii (lines of fields) format.",
  525. "                  This is not a complete file format",
  526. "                  but may be useful for importing/exporting",
  527. "                  data.",
  528. "",
  529. "list ch    Use the character CH to separate the cell values when using ",
  530. "        the `list' file format.",
  531. "",
  532. "status (n)    This option controls which line on the screen is used for",
  533. "        displaying the status of the current cell.  The number may be",
  534. "        positive, (counting down from the top), negative (counting up",
  535. "        from the bottom, or zero (disabling the status line).",
  536. "",
  537. "input (n)    This option controls which line on the screen is used for",
  538. "        reading lines of text.  The number may be positive (counting",
  539. "        down from the top), or negative (counting up from the",
  540. "        bottom), but not zero.",
  541. "",
  542. "The following options affect the currently active window:",
  543. "",
  544. "(no)page    In page mode, whenever a paticular cell is",
  545. "        displayed in the window, it will always be in the same",
  546. "        location on the screen.  In page mode, the recenter command",
  547. "        acts just like the redraw-screen command.",
  548. "",
  549. "(no)pageh    These options turns on or off page mode only in",
  550. "(no)pagev    the horizontal or vertical axis.",
  551. "",
  552. "(no)lockh    These options prevent the cell cursor in the current window",
  553. "(no)lockv    from moving in the horizontal or vertical direction, but only",
  554. "        when the cell cursor is moved in a window that this one is",
  555. "        linked.",
  556. "",
  557. "",
  558. "(no)edges    In edges mode oleo displays Row and Column numbers at the top",
  559. "        and left edges of the window.  Perhaps edges should be split",
  560. "        into edgeh and edgev?",
  561. "",
  562. "(no)standout    In standout mode, the edges (see (no)edges) are drawn in",
  563. "        standout mode (reverse video, usually).",
  564. #endif
  565.  
  566.  
  567.  
  568. DEFUN ("show-variable", FDshow_variable, FAshow_variable, show_var)
  569. #ifdef FUNC_ARG_STRINGS
  570. "SShow Variable? ",
  571. #endif
  572. #ifdef DOC_STRINGS
  573. "Report the current binding of a user-defined variable.",
  574. "Variables can be defined using the [set-variable].",
  575. #endif
  576.       
  577. DEFUN_3 ("show-all-variables", FDshow_all_variables, show_all_var)
  578. #ifdef DOC_STRINGS
  579. "Report the current bindings of all user-defined variables.",
  580. "Variables can be defined using the [set-variable].",
  581. #endif
  582.  
  583. DEFUN ("set-variable", FDset_var, FAset_var, set_var)
  584. #ifdef FUNC_ARG_STRINGS
  585. "SSet Variable? ",
  586. "sSet %0 to? ",
  587. #endif
  588. #ifdef DOC_STRINGS
  589. "Change the binding of a user-defined variable.",
  590. "Variables can be bound to cells or ranges of cells, and then referenced",
  591. "in formulas wherever a cell or range reference is allowed.",
  592. "If no new binding is given, then the variable becomes unbound.",
  593. #endif
  594.  
  595.  
  596.  
  597. DEFUN ("create-keymap", FDcreate_keymap, FAcreate_keymap, create_keymap)
  598. #ifdef FUNC_ARG_STRINGS
  599. "SCreate Kemap? ",
  600. "S'Parent map? ",
  601. #endif
  602. #ifdef DOC_STRINGS
  603. "Create a new keymap given it's NAME and PARENT.",
  604. "",
  605. "A keymap is a mapping from characters to commands and keymap.  As you type",
  606. "characters to Oleo, keymaps are used to decide how to interpret your",
  607. "keystrokes.  Emacs users are familiar with this concept, but should note",
  608. "that Oleo keymaps do not behave quite like Emacs keymaps.",
  609. "",
  610. "Every keymap has a (unique) name.  That name is used, for example, as an",
  611. "argument to the bind-key command.",
  612. "",
  613. "Every keymap has a parent map that is searched for bindings of keys that",
  614. "are otherwise undefined.  In other words, every keymap inherits bindings",
  615. "from some other keymap.  The keymap `universal' is at the root of the ",
  616. "inheritence tree.",
  617. #endif
  618.  
  619. DEFUN ("set-map-prompt", FDset_map_prompt, FAset_map_prompt, set_map_prompt)
  620. #ifdef FUNC_ARG_STRINGS
  621. "KSet prompt for keymap? ",
  622. "sPrompt for %1? ", 
  623. #endif
  624. #ifdef DOC_STRINGS
  625. "Set the prompt for KEYMAP to STRING.",
  626. "When KEYMAP is the current keymap, the prompt is displayed in the input",
  627. "area.",
  628. #endif
  629.  
  630.  
  631. DEFUN ("bind-key", FDbind_key, FAbind_key, bind_key)
  632. #ifdef FUNC_ARG_STRINGS
  633. "KKeymap? ",
  634. "SCommand? ",
  635. "cCharacter? ",
  636. #endif
  637. #ifdef DOC_STRINGS
  638. "In KEYMAP, make COMMAND the binding of KEY.",
  639. "COMMAND may be the name of an interactive function, the address of a macro,",
  640. "or the name of another keymap.",
  641. #endif
  642.  
  643. DEFUN ("bind-set", FDbind_set, FAbind_set, bind_set)
  644. #ifdef FUNC_ARG_STRINGS
  645. "KKeymap? ",
  646. "SCommand? ",
  647. "sCharacters? ",
  648. #endif
  649. #ifdef DOC_STRINGS
  650. "In KEYMAP, make COMMAND the binding of all chars in KEYSET.",
  651. "COMMAND may be the name of an interactive function, the address of a macro,",
  652. "or the name of another keymap.  Keyset should be two characters, separated",
  653. "by a `-', for example:",
  654. "    bind-set main begin-edit a-z",
  655. #endif
  656.  
  657. DEFUN ("bind-all-keys", FDbind_all_keys, FAbind_all_keys, bind_all_keys)
  658. #ifdef FUNC_ARG_STRINGS
  659. "KKeymap? ",
  660. "SCommand? ",
  661. #endif
  662. #ifdef DOC_STRINGS
  663. "In KEYMAP, bind every character to COMMAND.",
  664. "COMMAND may be the name of an interactive function, the address of a macro,",
  665. "or the name of another keymap.",
  666. #endif
  667.  
  668. DEFUN ("write-keys", FDwrite_keys_cmd, FAwrite_keys_cmd, write_keys_cmd)
  669. #ifdef FUNC_ARG_STRINGS
  670. "fwWrite bindings to file? ",
  671. #endif
  672. #ifdef DOC_STRINGS
  673. "Write a list of commands that recreate the current keybindings to FILE.",
  674. "This command is of limited utility and will probably go away or be",
  675. "changed considerably.  It is a way to generate a list of bindings, though.",
  676. #endif
  677.  
  678.  
  679.  
  680.  
  681. DEFUN ("write-variables",
  682.        FDwrite_variables, FAwrite_variables, write_variables)
  683. #ifdef FUNC_ARG_STRINGS
  684. "fwWrite variables to file? ", 
  685. #endif
  686. #ifdef DOC_STRINGS
  687. "Use variable names to construct a shell script to FILE.",
  688. "This command looks for all variables that are bound to a single",
  689. "cell (rather than to a range).  It writes a shell script that assigns",
  690. "the value of that cell to a shell variable.  For example, if the",
  691. "variable `w2_exemptions' is bound to cell R2C3, and that cell contains",
  692. "the value `2', then the output of write-variables will include a line:",
  693. "    w2_exemptions=2",
  694. "",
  695. "This command is of limited utility, but was implemented as part of a crude",
  696. "system of forms generation.",
  697. #endif
  698.  
  699. DEFUN ("read-variables", FDread_variables, FAread_variables, read_variables)
  700. #ifdef FUNC_ARG_STRINGS
  701. "frRead variables from file? ",
  702. #endif
  703. #ifdef DOC_STRINGS
  704. "Read cell values from a FILE.",
  705. "The syntax for the contents of FILE is <var>=<value>, e.g.:",
  706. "    w2_exemptions=2",    
  707. "For each assignment, if a variable with the given name is bound to a cell,",
  708. "the value is assigned to that cell.  See also, write-variables.",
  709. #endif
  710.  
  711.  
  712.  
  713. DEFUN ("read-commands", FDread_cmds_cmd, FAread_cmds_cmd, read_cmds_cmd)
  714. #ifdef FUNC_ARG_STRINGS
  715. "frRead commands from file? ",
  716. #endif
  717. #ifdef DOC_STRINGS
  718. "Read Oleo commands from FILE.",
  719. "The syntax for a command is a command name followed by a whitespace",
  720. "separated list arguments.  For example? ",
  721. "    bind-key main next-row ^n",
  722. "Blank lines and lines that begin with `#' are ignored.",
  723. "Lines may be continuted by precediing the final newline with an",
  724. "odd number of `\' characters.  One backslash and the newline will",
  725. "be discarded.",
  726. #endif
  727.  
  728.  
  729.  
  730. DEFUN_5 ("save-spreadsheet", FDwrite_cmd, FAwrite_cmd, DFwrite_cmd, write_cmd)
  731. #ifdef FUNC_ARG_STRINGS
  732. "fwSave spreadsheet? ",
  733. "=%0",
  734. #endif
  735. #ifdef FUNC_INIT_CODE
  736. "{insert-current-filename}",
  737. 0,
  738. #endif
  739. #ifdef DOC_STRINGS
  740. "Save the spreadsheet to FILENAME.",
  741. #endif
  742.  
  743. DEFUN ("toggle-load-hooks",
  744.        FDtoggle_load_hooks, FAtoggle_load_hooks, toggle_load_hooks)
  745. #ifdef FUNC_ARG_STRINGS
  746. "p?",
  747. #endif
  748. #ifdef DOC_STRINGS
  749. "Change whether load-hooks are run when spreadsheets are loaded.",
  750. "When active, the find-alternate-spreadsheet command looks for a variable",
  751. "called `load_hooks' and executes the macro at that address.",
  752. "With a positive prefix argument, turns load hooks on.  With a negative",
  753. "argument, turns them off.  With no argument, acts as a toggle.",
  754. #endif
  755.  
  756. DEFUN_5 ("find-alternate-spreadsheet",
  757.      FDread_cmd, FAread_cmd, DFread_cmd, read_cmd)
  758. #ifdef FUNC_ARG_STRINGS
  759. "frFind alternate spreadsheet? ",
  760. "MSpreadsheet modified;  kill anyway? (yes or no) ",
  761. "=%0",
  762. #endif
  763. #ifdef FUNC_INIT_CODE
  764. "{insert-current-filename}",
  765. 0,
  766. 0,
  767. #endif
  768. #ifdef DOC_STRINGS
  769. "Replace the currently loaded spreadsheet with the contents of FILE.",
  770. #endif
  771.  
  772. DEFUN ("merge-spreadsheet",
  773.        FDread_merge_cmd, FAread_merge_cmd, read_merge_cmd)
  774. #ifdef FUNC_ARG_STRINGS
  775. "frMerge spreadsheet? ",
  776. "MSpreadsheet modified; merge anyway? (yes or no) ",
  777. #endif
  778. #ifdef DOC_STRINGS
  779. "Combine the spreadsheet in FILE with the current spreadsheet.",
  780. "This reads a new spreadsheet without clearing all cells first.",
  781. #endif
  782.     
  783. DEFUN ("write-region-to-file",
  784.        FDwrite_reg_cmd, FAwrite_reg_cmd, write_reg_cmd)
  785. #ifdef FUNC_ARG_STRINGS
  786. "***r",
  787. "fwWrite region to file? ",
  788. #endif
  789. #ifdef DOC_STRINGS
  790. "Write the cells in RANGE to FILE using the current file format.",
  791. "This command also writes all variables that with bindings entirely",
  792. "inside of RANGE.",
  793. #endif
  794.  
  795.  
  796.  
  797. DEFUN ("copy-region", FDcopy_region, FAcopy_region, copy_region)
  798. #ifdef FUNC_ARG_STRINGS
  799. "rCopy region? ",
  800. "RCopy %0 to? ",
  801. #endif
  802. #ifdef DOC_STRINGS
  803. "Copy the contents of SOURCE-RANGE to DEST-RANGE.",
  804. "DEST-RANGE must be either a single cell (the upper-left corner of the",
  805. "destination), or a range containing the same number of cells as the",
  806. "source range.",
  807. #endif
  808.     
  809. DEFUN ("copy-values-in-region",
  810.        FDcopy_values_region, FAcopy_values_region, copy_values_region)
  811. #ifdef FUNC_ARG_STRINGS
  812. "rCopy values in region? ",
  813. "RCopy values in %0 to:",
  814. #endif
  815. #ifdef DOC_STRINGS
  816. "Copy the values of the cells in SOURCE-RANGE to DEST-RANGE.",
  817. "DEST-RANGE must be either a single cell (the upper-left corner of the",
  818. "destination), or a range containing the same number of cells as the",
  819. "source range.",
  820. #endif
  821.     
  822. DEFUN ("move-region",
  823.        FDmove_region, FAmove_region, move_region)
  824. #ifdef FUNC_ARG_STRINGS
  825. "rMove region? ",
  826. "RMove region %0 to? ",
  827. #endif
  828. #ifdef DOC_STRINGS
  829. "Move the contents of SOURCE-RANGE to DEST-RANGE.",
  830. "DEST-RANGE must be either a single cell (the upper-left corner of the",
  831. "destination), or a range containing the same number of rows and columns",
  832. "as the source range.",
  833. "",
  834. "This command makes adjustments to all formulas in the range as well as to",
  835. "formulas and variable bindings that refer to the range.",
  836. #endif
  837.     
  838. DEFUN ("insert-row", FDinsert_row, FAinsert_row, insert_row)
  839. #ifdef FUNC_ARG_STRINGS
  840. "+p",
  841. #endif
  842. #ifdef DOC_STRINGS
  843. "Insert ARG empty rows.",
  844. #endif
  845.  
  846. DEFUN ("insert-col", FDinsert_col, FAinsert_col, insert_col)
  847. #ifdef FUNC_ARG_STRINGS
  848. "+p",
  849. #endif
  850. #ifdef DOC_STRINGS
  851. "Insert ARG empty cols.",
  852. #endif
  853.  
  854. DEFUN ("delete-row", FDdelete_row, FAdelete_row, delete_row)
  855. #ifdef FUNC_ARG_STRINGS
  856. "+p",
  857. #endif
  858. #ifdef DOC_STRINGS
  859. "Delete ARG rows.",
  860. #endif
  861.  
  862. DEFUN ("delete-col", FDdelete_col, FAdelete_col, delete_col)
  863. #ifdef FUNC_ARG_STRINGS
  864. "+p",
  865. #endif
  866. #ifdef DOC_STRINGS
  867. "Delete ARG cols.",
  868. #endif
  869.  
  870.  
  871.  
  872. /* Commands for editting cells. */
  873.  
  874. DEFUN ("edit-cell", FDedit_cell, FAedit_cell, edit_cell)
  875. #ifdef FUNC_ARG_STRINGS
  876. "$Set %c to? ", 
  877. #endif
  878. #ifdef DOC_STRINGS
  879. "Assign FORMULA to the current cell.",
  880. #endif
  881.  
  882. DEFUN ("auto-move-up", FDauto_move_up, FAauto_move_up,
  883.        set_auto_direction)
  884. #ifdef FUNC_ARG_STRINGS
  885. "#0",
  886. #endif
  887. #ifdef DOC_STRINGS
  888. "Set the auto-move direction to `up'.",
  889. "This is the direction that will be used by the next-edit command.",
  890. #endif
  891.  
  892.  
  893. DEFUN ("auto-move-down", FDauto_move_down, FAauto_move_down,
  894.        set_auto_direction)
  895. #ifdef FUNC_ARG_STRINGS
  896. "#1",
  897. #endif
  898. #ifdef DOC_STRINGS
  899. "Set the auto-move direction to `down'.",
  900. "This is the direction that will be used by the next-edit command.",
  901. #endif
  902.  
  903.  
  904. DEFUN ("auto-move-left", FDauto_move_left, FAauto_move_left,
  905.        set_auto_direction)
  906. #ifdef FUNC_ARG_STRINGS
  907. "#3",
  908. #endif
  909. #ifdef DOC_STRINGS
  910. "Set the auto-move direction to `left'.",
  911. "This is the direction that will be used by the next-edit command.",
  912. #endif
  913.  
  914.  
  915. DEFUN ("auto-move-right", FDauto_move_right, FAauto_move_right,
  916.        set_auto_direction)
  917. #ifdef FUNC_ARG_STRINGS
  918. "#2",
  919. #endif
  920. #ifdef DOC_STRINGS
  921. "Set the auto-move direction to `right'.",
  922. "This is the direction that will be used by the next-edit command.",
  923. #endif
  924.  
  925.  
  926. DEFUN ("auto-move-up-left", FDauto_move_up_left, FAauto_move_up_left,
  927.        set_auto_direction)
  928. #ifdef FUNC_ARG_STRINGS
  929. "#5",
  930. #endif
  931. #ifdef DOC_STRINGS
  932. "Set the auto-move direction to `up left'.",
  933. "This is the direction that will be used by the next-edit command.",
  934. #endif
  935.  
  936.  
  937. DEFUN ("auto-move-up-right", FDauto_move_up_right, FAauto_move_up_right,
  938.        set_auto_direction)
  939. #ifdef FUNC_ARG_STRINGS
  940. "#4",
  941. #endif
  942. #ifdef DOC_STRINGS
  943. "Set the auto-move direction to `up right'.",
  944. "This is the direction that will be used by the next-edit command.",
  945. #endif
  946.  
  947.  
  948. DEFUN ("auto-move-down-left", FDauto_move_down_left, FAauto_move_down_left,
  949.        set_auto_direction)
  950. #ifdef FUNC_ARG_STRINGS
  951. "#7",
  952. #endif
  953. #ifdef DOC_STRINGS
  954. "Set the auto-move direction to `down left'.",
  955. "This is the direction that will be used by the next-edit command.",
  956. #endif
  957.  
  958.  
  959. DEFUN ("auto-move-down-right", FDauto_move_down_right, FAauto_move_down_right,
  960.        set_auto_direction)
  961. #ifdef FUNC_ARG_STRINGS
  962. "#6",
  963. #endif
  964. #ifdef DOC_STRINGS
  965. "Set the auto-move direction to `down right'.",
  966. "This is the direction that will be used by the next-edit command.",
  967. #endif
  968.  
  969.  
  970. DEFUN ("auto-move-no-motion", FDauto_move_no_motion, FAauto_move_no_motion,
  971.        set_auto_direction)
  972. #ifdef FUNC_ARG_STRINGS
  973. "#8",
  974. #endif
  975. #ifdef DOC_STRINGS
  976. "Set the auto-move direction to `no motion'.",
  977. "This is the direction that will be used by the next-edit command.",
  978. #endif
  979.  
  980. DEFUN_3 ("auto-move", FDauto_move, auto_move)
  981. #ifdef DOC_STRINGS
  982. "Move one cell in the automatic motion direction.",
  983. "The automatic motion direction is set using one of the commands? ",
  984. "    [auto-move-up]  auto-move-up",
  985. "    [auto-move-down]  auto-move-down",
  986. "    [auto-move-left]  auto-move-left",
  987. "    [auto-move-right]  auto-move-right",
  988. "    [auto-move-up-left]  auto-move-up-left",
  989. "    [auto-move-up-right]  auto-move-up-right",
  990. "    [auto-move-down-left]  auto-move-down-left",
  991. "    [auto-move-down-right]  auto-move-down-right",
  992. #endif
  993.  
  994. DEFUN_3 ("auto-next-set", FDauto_next_set, auto_next_set)
  995. #ifdef DOC_STRINGS
  996. "Scan in the opposite direction of automatic motion, then move one cell.",
  997. "The direction of the one-cell motion is down for left or right",
  998. "automatic motion, and to the right otherwise.  See also, `auto-move'.",
  999. #endif
  1000.  
  1001. DEFUN ("next-edit", FDnext_edit, FAnext_edit, run_string_as_macro)
  1002. #ifdef FUNC_ARG_STRINGS
  1003. "={exit-minibuffer}{auto-move}{edit-cell}",
  1004. "p",
  1005. #endif
  1006. #ifdef DOC_STRINGS
  1007. "Equivelent to: {exit-minibuffer}{auto-move}{edit-cell}",
  1008. "This command is used to terminate an edit-cell command, move to another",
  1009. "cell, and begin a second edit-cell command.  See also `auto-move'.",
  1010. #endif
  1011.  
  1012. DEFUN ("next-edit-set", FDnext_edit_set, FAnext_edit_set, run_string_as_macro)
  1013. #ifdef FUNC_ARG_STRINGS
  1014. "={exit-minibuffer}{auto-next-set}{edit-cell}",
  1015. "p",
  1016. #endif
  1017. #ifdef DOC_STRINGS
  1018. "Equivelent to: {exit-minibuffer}{auto-next-set}{edit-cell}",
  1019. "This command is used to terminate an edit-cell command, move to another",
  1020. "cell, and begin a second edit-cell command.  See also `auto-next-set'.",
  1021. #endif
  1022.  
  1023.  
  1024.  
  1025. DEFUN ("goto-edit-cell",
  1026.        FDgoto_edit_cell, FAgoto_edit_cell, goto_edit_cell)
  1027. #ifdef FUNC_ARG_STRINGS
  1028. "l",
  1029. #endif
  1030. #ifdef DOC_STRINGS
  1031. "Begin to edit the current cell's formula.",
  1032. "The last character used to invoke this command is reexecuted as a",
  1033. "formula editting command.",
  1034. #endif
  1035.  
  1036. DEFUN ("set-region-formula",
  1037.        FDset_region_formula, FAset_region_formula, set_region_formula)
  1038. #ifdef FUNC_ARG_STRINGS
  1039. "rSet region? ",
  1040. "$Set region %0 to? ",
  1041. #endif
  1042. #ifdef DOC_STRINGS
  1043. "Change the definition of all cells in RANGE to FORMULA.",
  1044. #endif
  1045.  
  1046.     
  1047.  
  1048.  
  1049. DEFUN_3 ("delete-cell", FDdelete_cell, kill_cell_cmd)
  1050. #ifdef DOC_STRINGS
  1051. "Erase the formula, font and format of the current cell.",
  1052. #endif
  1053.  
  1054. DEFUN ("delete-region", FDdelete_region, FAdelete_region, delete_region)
  1055. #ifdef FUNC_ARG_STRINGS
  1056. "rDelete region? ",
  1057. #endif
  1058. #ifdef DOC_STRINGS
  1059. "Erase the formulas, fonts and formats of the cells in RANGE.",
  1060. #endif
  1061.  
  1062. DEFUN ("clear-spreadsheet",
  1063.        FDclear_spreadsheet, FAclear_spreadsheet, kill_all_cmd) 
  1064. #ifdef FUNC_ARG_STRINGS
  1065. "MSpreadsheet modified;  clear anyway? (yes or no) ",
  1066. #endif
  1067. #ifdef DOC_STRINGS
  1068. "Erase all cells, reset all column widths and row heights.",
  1069. #endif
  1070.  
  1071.  
  1072.  
  1073. DEFUN ("print-region", FDprint_region, FAprint_region, print_region)
  1074. #ifdef FUNC_ARG_STRINGS
  1075. "rRegion? ",
  1076. "fwPrint to file? ",
  1077. #endif
  1078. #ifdef DOC_STRINGS
  1079. "Print (in ascii) the contents of REGION to FILE.",
  1080. #endif
  1081.  
  1082. DEFUN ("psprint-region",
  1083.        FDpsprint_region, FApsprint_region, psprint_region_cmd)
  1084. #ifdef FUNC_ARG_STRINGS
  1085. "rPrint region? ",
  1086. "fwWrite EPS to file? ",
  1087. #endif
  1088. #ifdef DOC_STRINGS
  1089. "Print the contents of REGION (in PostScript) to FILE.",
  1090. #endif
  1091.  
  1092. DEFUN ("set-page-size", FDset_page_size, FAset_page_size, set_page_size_cmd)
  1093. #ifdef FUNC_ARG_STRINGS
  1094. "sSet page size? ",
  1095. #endif
  1096. #ifdef DOC_STRINGS
  1097. "Use PAGESIZE when printing PostScript.",
  1098. "PAGESIZE may take the following forms:",
  1099. "    8.5x11        -- a page size in inches.",
  1100. "    22x28c        -- a page size in centimeters",
  1101. "    612x792p    -- a page size in points",
  1102. "or any of number of symbolic names? ",
  1103. "    letter        -- 8.5 x 11 in.",
  1104. "    landscape    -- 11 x 8.5 in.",
  1105. "    etc.",
  1106. "To see a complete list of availble names, see the Oleo source file",
  1107. "`print.c'.",
  1108. #endif
  1109.  
  1110. DEFUN ("set-deault-ps-font",
  1111.        FDset_ps_font_cmd, FAset_ps_font_cmd, set_ps_font_cmd)
  1112. #ifdef FUNC_ARG_STRINGS
  1113. "sSet default postscript font? ",
  1114. #endif
  1115. #ifdef DOC_STRINGS
  1116. "Make FONT the default postscript font.",
  1117. "FONT should be a valid postscript font name (e.g. TimesRoman). That font",
  1118. "will be used to print all cells with no explicitly defined font.",
  1119. #endif
  1120.     
  1121.  
  1122.  
  1123. DEFUN ("set-default-x-font",
  1124.        FDset_default__x_font, FAset_default_x_font, set_x_default_font)
  1125. #ifdef FUNC_ARG_STRINGS
  1126. "sSet default X11 font? ",
  1127. #endif
  1128. #ifdef DOC_STRINGS
  1129. "Make FONT the default X11 font.",
  1130. "FONT should be a valid X11 font name, with the point size wildcarded.",
  1131. "For example? ",
  1132. "        *times-medium-r-*",
  1133. "",
  1134. "This will be used to display all cells with no explicitly defined font.",
  1135. #endif
  1136.  
  1137. #ifdef HAVE_X11_X_H
  1138. DEFUN ("set-default-point-size", FDset_x_default_point_size,
  1139.        FAset_x_default_point_size, set_x_default_point_size)
  1140. #ifdef FUNC_ARG_STRINGS
  1141. "NSet default point size? ",
  1142. #endif
  1143. #ifdef DOC_STRINGS
  1144. "Set the default point size of cell text under X11 to ARG.",
  1145. "Presuming that properly wildcarded font names have been used",
  1146. "This causes all other fonts to be scaled accordingly.",
  1147. #endif
  1148.  
  1149. #endif
  1150.  
  1151. DEFUN ("define-font", FDdefine_font, FAdefine_font, define_font)
  1152. #ifdef FUNC_ARG_STRINGS
  1153. "wDefine font name? ",
  1154. "wX11 name for %0? ",
  1155. "wPostscript name for %0? ",
  1156. #endif
  1157. #ifdef DOC_STRINGS
  1158. "Define the font OLEONAME to correspond to X11NAME and POSTSCRIPTNAME.",
  1159. ""
  1160. "The Oleo name of a font is used with commands like set-region-font.",
  1161. "It should be easy to type and to remember, for example? ",
  1162. "",
  1163. "        times",
  1164. "",
  1165. "To achieve the best results, the X11 font name should leave the",
  1166. "pointsize wild-carded.  For example? ",
  1167. "",
  1168. "        *times-medium-r-*",
  1169. ""
  1170. "The postscript name should be a font name acceptable to your printer.",
  1171. "For example:",
  1172. "",
  1173. "        TimesRoman",
  1174. "",
  1175. #endif
  1176.  
  1177.  
  1178.  
  1179.  
  1180. DEFUN ("set-x-default-font",
  1181.        FDset_x_def_font, FAset_x_def_font, set_x_default_font)
  1182. #ifdef FUNC_ARG_STRINGS
  1183. "sX11 font specification? ",
  1184. #endif
  1185. #ifdef DOC_STRINGS
  1186. "Set the X11 name of the default font.",
  1187. "The name should be a valid X11 font name, preferably with the point",
  1188. "size wild-carded, for example:",
  1189. "",
  1190. "        *times-medium-r-*",
  1191. #endif
  1192.  
  1193.  
  1194. DEFUN_5 ("set-cell-font", FDset_cell_font, FAset_cell_font,
  1195.      DFset_cell_font, set_region_font)
  1196. #ifdef FUNC_ARG_STRINGS
  1197. ".'",
  1198. "sSet %0 font to? ",
  1199. "dScale? (ratio to the default point size e.g. 1.3) ",
  1200. #endif
  1201. #ifdef FUNC_INIT_CODE
  1202. 0,
  1203. "{insert-cell-attr %0 font}",
  1204. "{insert-cell-attr %0 font-scale}",
  1205. #endif
  1206. #ifdef DOC_STRINGS
  1207. "Set the current cell's font to NAME at SCALE",
  1208. "NAME should be a name defined with [define-font].",
  1209. "SCALE should be a floating point number, which will be interpreted",
  1210. "as a ratio to the default point size.  For example, if SCALE is 1.33",
  1211. "and the default point size is 12 then this cell will be drawn with",
  1212. "a point size of 16.",
  1213. "",
  1214. "Under X, this scaling behavior depends on having a wide variety of fonts",
  1215. "installed, and wildcarding point-sizes in x11 font names passed to ",
  1216. "define-font.",
  1217. #endif
  1218.  
  1219. DEFUN_5 ("set-region-font", FDset_region_font, FAset_region_font,
  1220.      DFset_region_font, set_region_font)
  1221. #ifdef FUNC_ARG_STRINGS
  1222. "rSet font for what region? ",
  1223. "sSet %0 font to? ",
  1224. "dPoint size? ",
  1225. #endif
  1226. #ifdef FUNC_INIT_CODE
  1227. 0,
  1228. "{insert-cell-attr %0 font}",
  1229. "{insert-cell-attr %0 font-scale}",
  1230. #endif
  1231. #ifdef DOC_STRINGS
  1232. "Set the font of cells in REGION to NAME at SCALE",
  1233. "NAME should be a name defined with [define-font].",
  1234. "SCALE should be a floating point number, which will be interpreted",
  1235. "as a ratio to the default point size.  For example, if SCALE is 1.33",
  1236. "and the default point size is 12 then this cell will be drawn with",
  1237. "a point size of 16.",
  1238. "",
  1239. "Under X, this scaling behavior depends on having a wide variety of fonts",
  1240. "installed, and wildcarding point-sizes in x11 font names passed to ",
  1241. "define-font.",
  1242. #endif
  1243.  
  1244.  
  1245.  
  1246.  
  1247. DEFUN_3 ("recenter-window", FDrecenter_window, recenter_window)
  1248. #ifdef DOC_STRINGS
  1249. "Center the cell cursor in the current window.",
  1250. #endif
  1251.  
  1252. /* Window commands (basic.h) */
  1253. DEFUN ("open-window", FDopen_window, FAopen_window, open_window)
  1254. #ifdef FUNC_ARG_STRINGS
  1255. "sSplit command? ",
  1256. #endif
  1257. #ifdef DOC_STRINGS
  1258. "Split the window according to SPLIT.",
  1259. "The syntax of split is an orientation (`h' or `v') followed by",
  1260. "either a number of rows (cols) or a percentege of rows (cols).",
  1261. "For example? ",
  1262. "    h10",
  1263. "    v33%",
  1264. #endif
  1265.  
  1266. DEFUN_3 ("split-window-horizontally", FDhsplit_window, hsplit_window)
  1267. #ifdef DOC_STRINGS
  1268. "Divide the current window evenly into two windows side by side.",
  1269. #endif
  1270.  
  1271. DEFUN_3 ("split-window-vertically", FDvsplit_window, vsplit_window)
  1272. #ifdef DOC_STRINGS
  1273. "Divide the current window evenly into two stacked windows.",
  1274. #endif
  1275.     
  1276. DEFUN_3 ("delete-window", FDdelete_window, delete_window)
  1277. #ifdef DOC_STRINGS
  1278. "Remove the current window from the display.",
  1279. #endif
  1280.  
  1281. DEFUN_3 ("delete-other-windows", FDdelete_other_windows, delete_other_windows)
  1282. #ifdef DOC_STRINGS
  1283. "Remove all but the current window from the display.",
  1284. #endif
  1285.  
  1286. DEFUN ("close-window", FDclose_window, FAclose_window, close_window)
  1287. #ifdef FUNC_ARG_STRINGS
  1288. "NClose window number? ",
  1289. #endif
  1290. #ifdef DOC_STRINGS
  1291. "Remove the window ARG from the display.",
  1292. #endif
  1293.     
  1294. DEFUN ("goto-window", FDgoto_window, FAgoto_window, goto_window)
  1295. #ifdef FUNC_ARG_STRINGS
  1296. "NGoto window number? ",
  1297. #endif
  1298. #ifdef DOC_STRINGS
  1299. "Make the ARGth window the current window.",
  1300. #endif
  1301.     
  1302. DEFUN_3 ("goto-minibuffer", FDgoto_minibuffer, goto_minibuffer)
  1303. #ifdef DOC_STRINGS
  1304. "Select the input area as the current window.",
  1305. "An error is given if the input area is not active.",
  1306. #endif
  1307.  
  1308. DEFUN_3 ("other-window", FDother_window, other_window)
  1309. #ifdef FUNC_ARG_STRINGS
  1310. "+p",
  1311. #endif
  1312. #ifdef DOC_STRINGS
  1313. "Select the ARGth different window.",
  1314. #endif
  1315.  
  1316.  
  1317.  
  1318. DEFUN ("toggle-overwrite", FDtoggle_overwrite, FAtoggle_overwrite, toggle_overwrite)
  1319. #ifdef FUNC_ARG_STRINGS
  1320. "p?",
  1321. "p",
  1322. #endif
  1323. #ifdef DOC_STRINGS
  1324. "Toggle between insert and overwrite mode.",
  1325. "This command only applies when an argument is being editted.",
  1326. "",
  1327. "With a positive (non-0) prefix argument, turn overwrite mode on.",
  1328. "With a negative or 0 prefix argument, turn overwrite mode off.",
  1329. "With no prefix argument, toggle overwrite mode.",
  1330. #endif
  1331.  
  1332.  
  1333. DEFUN_3 ("beginning-of-line", FDbeginning_of_line, beginning_of_line)
  1334. #ifdef DOC_STRINGS
  1335. "Move point to beginning of input line.",
  1336. #endif
  1337.  
  1338. DEFUN_3 ("end-of-line", FDend_of_line, end_of_line)
  1339. #ifdef DOC_STRINGS
  1340. "Move point to end of input line.",
  1341. #endif
  1342.  
  1343. DEFUN ("backward-char", FDbackward_char, FAbackward_char, backward_char)
  1344. #ifdef FUNC_ARG_STRINGS
  1345. "p",
  1346. #endif
  1347. #ifdef DOC_STRINGS
  1348. "Move point left ARG characters (right if ARG negative).",
  1349. "On attempt to pass beginning or end of buffer, report an error.",
  1350. #endif
  1351.  
  1352. DEFUN ("backward-word", FDbackward_word, FAbackward_word, backward_word)
  1353. #ifdef FUNC_ARG_STRINGS
  1354. "p",
  1355. #endif
  1356. #ifdef DOC_STRINGS
  1357. "Move backward in the input area until encountering the end of a word.",
  1358. "With argument, do this that many times.",
  1359. #endif
  1360.  
  1361.  
  1362. DEFUN ("backward-delete-char", FDbackward_delete_char, FAbackward_delete_char, backward_delete_char)
  1363. #ifdef FUNC_ARG_STRINGS
  1364. "p",
  1365. #endif
  1366. #ifdef DOC_STRINGS
  1367. "Delete ARG characters backward.",
  1368. #endif
  1369.  
  1370. DEFUN ("backward-delete-word", FDbackward_delete_word, FAbackward_delete_word, backward_delete_word)
  1371. #ifdef FUNC_ARG_STRINGS
  1372. "p",
  1373. #endif
  1374. #ifdef DOC_STRINGS
  1375. "Kill characters backward until encountering the end of a word.",
  1376. "With prefix argument, do this that many times.",
  1377. #endif
  1378.  
  1379. DEFUN_3 ("delete-to-start", FDdelete_to_start, delete_to_start)
  1380. #ifdef DOC_STRINGS
  1381. "Delete the input line, upto the cursor position.",
  1382. #endif
  1383.  
  1384. DEFUN ("forward-char", FDforward_char, FAforward_char, forward_char)
  1385. #ifdef FUNC_ARG_STRINGS
  1386. "p",
  1387. #endif
  1388. #ifdef DOC_STRINGS
  1389. "Move the input area cursor right ARG characters (left if ARG negative).",
  1390. "On reaching end of buffer, report an error.",
  1391. #endif
  1392.  
  1393. DEFUN ("forward-word", FDforward_word, FAforward_word, forward_word)
  1394. #ifdef FUNC_ARG_STRINGS
  1395. "p",
  1396. #endif
  1397. #ifdef DOC_STRINGS
  1398. "Move the input area cursor forward ARG words (backward if ARG is negative).",
  1399. #endif
  1400.  
  1401. DEFUN ("delete-char", FDdelete_char, FAdelete_char, delete_char)
  1402. #ifdef FUNC_ARG_STRINGS
  1403. "p",
  1404. #endif
  1405. #ifdef DOC_STRINGS
  1406. "Delete ARG following characters in the input area.",
  1407. "Deletes backwards with negative arg.",
  1408. #endif
  1409.  
  1410. DEFUN ("delete-word", FDdelete_word, FAdelete_word, delete_word)
  1411. #ifdef FUNC_ARG_STRINGS
  1412. "p",
  1413. #endif
  1414. #ifdef DOC_STRINGS
  1415. "Kill characters forward until encountering the end of a word.",
  1416. "With argument, do this that many times.",
  1417. #endif
  1418.  
  1419.  
  1420. DEFUN_3 ("kill-line", FDkill_line, kill_line)
  1421. #ifdef DOC_STRINGS
  1422. "Delete the rest of the input line, beginning at the cursor position.",
  1423. #endif
  1424.  
  1425. DEFUN_3 ("insert-cell-expression",
  1426.          FDinsert_cell_expression, insert_cell_expression)
  1427. #ifdef DOC_STRINGS
  1428. "Insert the current cell's formula in the input area.",
  1429. #endif
  1430.  
  1431.  
  1432. DEFUN_3 ("insert-cell-value", FDinsert_cell_value, insert_cell_value)
  1433. #ifdef DOC_STRINGS
  1434. "Insert the current cell's value (not it's formula) in the input area.",
  1435. #endif
  1436.  
  1437. DEFUN_3 ("insert-rel-ref", FDinsert_rel_ref, insert_rel_ref)
  1438. #ifdef DOC_STRINGS
  1439. "Insert a relative reference in the input area.",
  1440. "This command can only be executed when a cell formula is being editted.",
  1441. "The inserted references is to the current cell, and is relative to the",
  1442. "cell being defined.",
  1443. #endif
  1444.  
  1445.  
  1446. DEFUN_3 ("insert-abs-ref", FDinsert_abs_ref, insert_abs_ref)
  1447. #ifdef DOC_STRINGS
  1448. "Insert an absolute reference to the current cell in the input area.",
  1449. #endif
  1450.  
  1451. DEFUN ("insert-cell-attr",
  1452.        FDinsert_cell_attr, FAinsert_cell_attr, insert_cell_attr)
  1453. #ifdef FUNC_ARG_STRINGS
  1454. "RInsert attribute of cell? ",
  1455. "SInsert %0 attribute? ", 
  1456. #endif
  1457. #ifdef DOC_STRINGS
  1458. "(Internal use -- probably not useful as a command.)",
  1459. "For the lr,lc cell in RNG, insert the name of its named ATTRIBUTE.",
  1460. "Supported ATTRIBUTEs are `width', `height', `font', `font-scale' and",
  1461. "`format'.",
  1462. #endif
  1463.  
  1464. DEFUN_3 ("insert-current-filename",
  1465.      FDinsert_current_filename, insert_current_filename)
  1466. #ifdef DOC_STRINGS
  1467. "Insert the name of the current file (if any) in the input area.",
  1468. #endif
  1469.  
  1470. DEFUN_3 ("insert-context-word", FDinsert_context_word, insert_context_word)
  1471. #ifdef DOC_STRINGS
  1472. "(internal use)",
  1473. #endif
  1474.  
  1475. DEFUN ("insert-user-format-part",
  1476.        FDinsert_usr_fmt_part, FAinsert_usr_fmt_part, insert_usr_fmt_part)
  1477. #ifdef FUNC_ARG_STRINGS
  1478. "nInsert part of user format [1-16]? ",
  1479. "nInsert which part of user format %0 [1-9]? ",
  1480. #endif
  1481. #ifdef DOC_STRINGS
  1482. "(Internal use -- probably not useful as a command.)",
  1483. "For user format FMT, insert the Nth field.",
  1484. "The fields of a user format are numbered this way:",
  1485. "  1 - positive header",
  1486. "  2 - negative header",
  1487. "  3 - positive trailer",
  1488. "  4 - negative trailer",
  1489. "  5 - representation of zero",
  1490. "  6 - comma (as in 1,000,000.00)",
  1491. "  7 - decimal point",
  1492. "  8 - precision", 
  1493. "  9 - scale factor",
  1494. "",
  1495. "For more formation, see documentation for the comand define-user-format.",
  1496. #endif
  1497.  
  1498.  
  1499. DEFUN ("self-insert-command",
  1500.        FDself_insert_command, FAself_insert_command, self_insert_command)
  1501. #ifdef FUNC_ARG_STRINGS
  1502. "l",
  1503. "p",
  1504. #endif
  1505. #ifdef DOC_STRINGS
  1506. "Insert the last-typed character in the input area.",
  1507. "Prefix arg is a repeat-count.",
  1508. #endif
  1509.  
  1510. DEFUN ("self-map-command",
  1511.        FDself_map_command, FAself_map_command, self_map_command)
  1512. #ifdef FUNC_ARG_STRINGS
  1513. "l",
  1514. #endif
  1515. #ifdef DOC_STRINGS
  1516. "Map the last-typed character in the keysequence argument being editted.",
  1517. "This is used by the help system to prompt for the argument to describe-key and",
  1518. "describe-key-briefly.",
  1519. #endif
  1520.  
  1521. DEFUN ("exit-self-inserting",
  1522.        FDexit_self_inserting, FAexit_self_inserting, exit_self_inserting)
  1523. #ifdef FUNC_ARG_STRINGS
  1524. "l",
  1525. #endif
  1526. #ifdef DOC_STRINGS
  1527. "Insert the name of the last character typed and exit the minibuffer.",
  1528. "This is used to implement commands which prompt the user for a character.",
  1529. #endif
  1530.  
  1531.  
  1532.  
  1533. DEFUN ("display-error-msg",
  1534.        FDdisplay_error_msg, FAdisplay_error_msg, display_error_msg)
  1535. #ifdef FUNC_ARG_STRINGS
  1536. "sMessage? ",
  1537. "c'%0",
  1538. #endif
  1539. #ifdef DOC_STRINGS
  1540. "Display an error message for the user.",
  1541. "The message vanishes as soon as the user types the next character of input",
  1542. "of after a brief timeout.",
  1543. #endif
  1544.  
  1545.  
  1546.  
  1547. /* Functions related to setting cell attributes. */
  1548. DEFUN_5 ("set-region-height", FDset_region_height, FAset_region_height,
  1549.      DFset_region_height, set_region_height)
  1550. #ifdef FUNC_ARG_STRINGS
  1551. "rSet height for region? ",
  1552. "sSet height for %0 to? ",
  1553. #endif
  1554. #ifdef FUNC_INIT_CODE
  1555. 0,
  1556. "{insert-cell-attr %0 height}",
  1557. #endif
  1558. #ifdef DOC_STRINGS
  1559. "Set the height for rows in RANGE to HEIGHT.",
  1560. "HEIGHT may be a non-negative integer or `default', in which case the value",
  1561. "set with [set-default-height] is used.",
  1562. "",
  1563. "On the screen, a cell of height N is as tall as N lines of text in the",
  1564. "default cell font.",
  1565. #endif
  1566.  
  1567. DEFUN_5 ("set-region-width", FDset_region_width, FAset_region_width,
  1568.      DFset_region_width, set_region_width)
  1569. #ifdef FUNC_ARG_STRINGS
  1570. "rSet width for region? ",
  1571. "sSet width for %0 to? ",
  1572. #endif
  1573. #ifdef FUNC_INIT_CODE
  1574. 0,
  1575. "{insert-cell-attr %0 width}",
  1576. #endif
  1577. #ifdef DOC_STRINGS
  1578. "Set the width of columns in RANGE to WIDTH.",
  1579. "WIDTH may be a non-negative integer or `default', in which case the value",
  1580. "set with [set-default-width] is used.",
  1581. "",
  1582. "On the screen, a cell of width N is as wide as N repitions of the character",
  1583. "`M' in the default cell font.",
  1584. #endif
  1585.  
  1586.  
  1587. DEFUN ("set-region-protection", FDset_region_protection,
  1588.        FAset_region_protection, set_region_protection)
  1589. #ifdef FUNC_ARG_STRINGS
  1590. "rSet protection for region? ",
  1591. "[dpu][D]efault  [P]rotect  [U]nprotect? ",
  1592. #endif
  1593. #ifdef DOC_STRINGS
  1594. "Set the protection for cells in a REGION to PROT.",
  1595. "PROT may be `d' for default, `p' - protected, or `u' - unprotected.",
  1596. #endif
  1597.  
  1598.  
  1599. DEFUN ("set-region-alignment", FDset_region_alignment,
  1600.        FAset_region_alignment, set_region_alignment)
  1601. #ifdef FUNC_ARG_STRINGS
  1602. "rSet alignment for region? ",
  1603. "[dlcr][D]efault  [L]eft  [C]enter  [R]ight? ",
  1604. #endif
  1605. #ifdef DOC_STRINGS
  1606. "Set the alignment for cells in a REGION to JST.",
  1607. "JST may be `d' for default, `l' - left, `r' - right, or `c' - center.",
  1608. #endif
  1609.  
  1610.  
  1611. DEFUN_5 ("set-region-format", FDset_region_format, FAset_region_format,
  1612.      DFset_region_format, set_region_format)
  1613. #ifdef FUNC_ARG_STRINGS
  1614. "rSet format for region? ",
  1615. "FSet format of %0 to? ",
  1616. #endif
  1617. #ifdef FUNC_INIT_CODE
  1618. 0,
  1619. "{insert-cell-attr %0 format}",
  1620. #endif
  1621. #ifdef DOC_STRINGS
  1622. "Set the format for cells in REGION to FORMAT.",
  1623. "Oleo can display numbers in these formats:",
  1624. "",
  1625. "integer        The number is rounded to an integer before being displayed.",
  1626. "",
  1627. "float        The number is displayed in decimal notation, using",
  1628. "        whatever precision is needed (or fits).",
  1629. "",
  1630. "hidden        The number is not displayed.  This has no other effect on",
  1631. "        the cell (e.g. it is recalculated normally).",
  1632. "",
  1633. "",
  1634. "graph        The number is displayed as a small graph.  If the number is",
  1635. "        close to zero, it will be displayed as '0', If it is positive,",
  1636. "        a row of '+'-es is displayed.  If it is negative, a row of",
  1637. "        '-'-es is displayed.",
  1638. "",
  1639. "user-1 through    These are the sixteen user-defined formats.  ",
  1640. "user-16        c.f. set-user-format.",
  1641. "",
  1642. "The following formats require a precision.  The precision may be a number",
  1643. "from zero to 14, in which case that number of digits will always be displayed",
  1644. "after the decimal point (zero-padding or rounding the number as needed), or",
  1645. "the precision may be 'float', in which case oleo will use as many digits as",
  1646. "necessary.  As examples:",
  1647. "",
  1648. "    dollar.2            display like ``$1,769.00''",
  1649. "    general.float                \"    \"    ``1769.00032''    ",
  1650. "",
  1651. "general        This uses either normal or scientific notation, depending on",
  1652. "        the magnitude of the number and the width of the column.",
  1653. "",
  1654. "dollar        Positive values are preceeded by '$', (so 3 is displayed as",
  1655. "        '$3').  Negative values are parenthasized (so -3 is displayed",
  1656. "        as '($3)'), and all large values have a ',' every three",
  1657. "        digits (so 1000 is displayed as '$1,000'.",
  1658. "",
  1659. "comma        Positive numbers are not preceede by '$', but this is",
  1660. "        otherwise identical to 'dollar'.",
  1661. "",
  1662. "percent        The value is multiplied by 100, and is displayed with a",
  1663. "        trailing '%'.  Thus .01 displays as '1%', while 1 displays as",
  1664. "        '100%'.",
  1665. "",
  1666. "fixed        The number is displayed in normal, everyday notation, using",
  1667. "        the precision specified.  'fixed.float' is the same as",
  1668. "        'float'.  'fixed.0' is the same as 'integer'.",
  1669. "",
  1670. "exponent    The number is displayed in scientific notation.",
  1671. "",
  1672. #endif
  1673.  
  1674.  
  1675. DEFUN_5 ("set-cell-height", FDset_cell_height, FAset_cell_height,
  1676.      DFset_cell_height, set_region_height)
  1677. #ifdef FUNC_ARG_STRINGS
  1678. ".'",
  1679. "sSet height for %0 to? ",
  1680. #endif
  1681. #ifdef FUNC_INIT_CODE
  1682. 0,
  1683. "{insert-cell-attr %0 height}",
  1684. #endif
  1685. #ifdef DOC_STRINGS
  1686. "Set the height for ROW to HEIGHT.",
  1687. "HEIGHT may be a non-negative integer or `default', in which case the value",
  1688. "set with [set-default-height] is used.",
  1689. "",
  1690. "On the screen, a cell of height N is as tall as N lines of text in the",
  1691. "default cell font.",
  1692. #endif
  1693.  
  1694. DEFUN_5 ("set-cell-width", FDset_cell_width, FAset_cell_width,
  1695.      DFset_cell_width, set_region_width)
  1696. #ifdef FUNC_ARG_STRINGS
  1697. ".'",
  1698. "sSet width for %0 to? ",
  1699. #endif
  1700. #ifdef FUNC_INIT_CODE
  1701. 0,
  1702. "{insert-cell-attr %0 width}",
  1703. #endif
  1704. #ifdef DOC_STRINGS
  1705. "Set the width for COL to WIDTH.",
  1706. "WIDTH may be a non-negative integer or `default', in which case the value",
  1707. "set with [set-default-width] is used.",
  1708. "",
  1709. "On the screen, a cell of width N is as wide as N repitions of `M' in the",
  1710. "default cell font.",
  1711. #endif
  1712.  
  1713. DEFUN ("set-cell-protection",
  1714.        FDset_cell_protection, FAset_cell_protection, set_region_protection)
  1715. #ifdef FUNC_ARG_STRINGS
  1716. ".'",
  1717. "[dpu][D]efault  [P]rotect  [U]nprotect? ",
  1718. #endif
  1719. #ifdef DOC_STRINGS
  1720. "Set the protection for CELL to PROT.",
  1721. "PROT may be `d' for default, `p' - protected, or `u' - unprotected.",
  1722. #endif
  1723.  
  1724. DEFUN ("set-cell-alignment",
  1725.        FDset_cell_alignment, FAset_cell_alignment, set_region_alignment)
  1726. #ifdef FUNC_ARG_STRINGS
  1727. ".'",
  1728. "[dlcr][D]efault  [L]eft  [C]enter  [R]ight? ",
  1729. #endif
  1730. #ifdef DOC_STRINGS
  1731. "Set the alignment for CELL to JST.",
  1732. "JST may be `d' for default, `l' - left, `r' - right, or `c' - center.",
  1733. #endif
  1734.  
  1735. DEFUN_5 ("set-cell-format", FDset_cell_format, FAset_cell_format,
  1736.      DFset_cell_format, set_region_format)
  1737. #ifdef FUNC_ARG_STRINGS
  1738. ".'",
  1739. "FSet format of %0 to? ",
  1740. #endif
  1741. #ifdef FUNC_INIT_CODE
  1742. 0,
  1743. "{insert-cell-attr %0 format}",
  1744. #endif
  1745. #ifdef DOC_STRINGS
  1746. "Set the format for numeric display for CELL to FORMAT.",
  1747. "For a description of valid formats, see set-region-format.",
  1748. #endif
  1749.  
  1750.  
  1751. /* Defaults....*/
  1752.  
  1753. DEFUN ("set-default-height",
  1754.        FDset_def_height, FAset_def_height, set_def_height)
  1755. #ifdef FUNC_ARG_STRINGS
  1756. "nDefault height? ",
  1757. #endif
  1758. #ifdef DOC_STRINGS
  1759. "Set the default height of rows.",
  1760. "See set-region-height for more information.",
  1761. #endif
  1762.  
  1763.  
  1764. DEFUN ("set-default-width",
  1765.        FDset_def_width, FAset_def_width, set_def_width)
  1766. #ifdef FUNC_ARG_STRINGS
  1767. "sDefault width? ",
  1768. #endif
  1769. #ifdef DOC_STRINGS
  1770. "Set the default height of cols.",
  1771. "See set-region-width for more information.",
  1772. #endif
  1773.  
  1774. DEFUN ("set-user-scales",
  1775.        FDset_user_scales, FAset_user_scales, set_user_scales) 
  1776. #ifdef FUNC_ARG_STRINGS
  1777. "dScale row hights by? ",
  1778. "dScale column widths by? ",
  1779. #endif
  1780. #ifdef DOC_STRINGS
  1781. "Scale HEIGHT and WIDTH by the given floating point amounts.",
  1782. #endif
  1783.  
  1784.  
  1785. DEFUN ("set-default-protection", FDset_def_protection,
  1786.        FAset_def_protection, set_def_protection)
  1787. #ifdef FUNC_ARG_STRINGS
  1788. "[pu][U]nprotected  or  [P]rotected",
  1789. #endif
  1790. #ifdef DOC_STRINGS
  1791. "Set the default protection of cells.",
  1792. "A protection may be specified as `p' for protected, or `u' -- unprotected.",
  1793. #endif
  1794.  
  1795.  
  1796. DEFUN ("set-default-alignment",
  1797.        FDset_def_alignment, FAset_def_alignment, set_def_alignment)
  1798. #ifdef FUNC_ARG_STRINGS
  1799. "[dlcrDLCR][L]eft  [C]enter  [R]ight  [D]efault",
  1800. #endif
  1801. #ifdef DOC_STRINGS
  1802. "Set the default alignment of cells.",
  1803. "An allignment may be specified as `l' for left, `c' -- center, `r' -- right",
  1804. "or `d' -- default.",
  1805. #endif
  1806.  
  1807. DEFUN ("set-default-format",
  1808.        FDset_def_format, FAset_def_format, set_def_format)
  1809. #ifdef FUNC_ARG_STRINGS
  1810. "FDefault format? ",
  1811. #endif
  1812. #ifdef DOC_STRINGS
  1813. "Set the default format for numeric display to FORMAT.",
  1814. "See set-region-format for an explanation of formats.",
  1815. #endif
  1816.  
  1817. DEFUN ("set-default-font",
  1818.        FDset_default_font, FAset_default_font, set_default_font)
  1819. #ifdef FUNC_ARG_STRINGS
  1820. "sSet default font to? ",
  1821. "dPoint size? (e.g. 1.3) ",
  1822. #endif
  1823. #ifdef DOC_STRINGS
  1824. "Set the default font to NAME at SCALE",
  1825. "NAME should be a name defined with [define-font].",
  1826. "SCALE should be a floating point number, which will be interpreted",
  1827. "as a ratio to the default point size.  For example, if SCALE is 1.33",
  1828. "and the default point size is 12 then this cell will be drawn with",
  1829. "a point size of 16.",
  1830. "",
  1831. "Under X, this scaling behavior depends on having a wide variety of fonts",
  1832. "installed, and wildcarding point-sizes in x11 font names passed to ",
  1833. "define-font.",
  1834. #endif
  1835.  
  1836. DEFUN_5 ("define-user-format",
  1837.      FDdefine_usr_fmt, FAdefine_usr_fmt, DFdefine_usr_fmt, define_usr_fmt)
  1838. #ifdef FUNC_ARG_STRINGS
  1839. "N[1,16]Define format [1-16]? ",
  1840. "sPositive header? ",
  1841. "sNegative header? ",
  1842. "sPositive trailer? ",
  1843. "sNegative trailer? ",
  1844. "sRepresentation of zero? ",
  1845. "sComma? ",
  1846. "sDecimal point? ",
  1847. "sPrecision [0-14 or `float']? ",
  1848. "sScale-factor? ",
  1849. #endif
  1850. #ifdef FUNC_INIT_CODE
  1851. 0,
  1852. "{insert-user-format-part %0 1}",
  1853. "{insert-user-format-part %0 2}",
  1854. "{insert-user-format-part %0 3}",
  1855. "{insert-user-format-part %0 4}",
  1856. "{insert-user-format-part %0 5}",
  1857. "{insert-user-format-part %0 6}",
  1858. "{insert-user-format-part %0 7}",
  1859. "{insert-user-format-part %0 8}",
  1860. "{insert-user-format-part %0 9}",
  1861. #endif
  1862. #ifdef DOC_STRINGS
  1863. "Set the parameters of a user-defined numeric format.",
  1864. "",
  1865. "There are sixteen user-defined numeric formats (maned `user-1' ... `user-16').",
  1866. "Each format specifies a syntax for printing numbers.  They may be used ",
  1867. "inconjuction with the [set-cell-format] and [set-region-format] commands.",
  1868. "",
  1869. "Each format has these parameters (using the 'dollar' format for an example).",
  1870. "",
  1871. "Parameter Name        Example:    How it is used",
  1872. "",
  1873. "Positive header        $        before postive numbers.",
  1874. "Negative header        ($        before negative numbers.",
  1875. "Positive trailer            after positive numbers.",
  1876. "Negative trailer    )        after negative numbers.",
  1877. "Zero            $0.00        if the number is 0.",
  1878. "Comma            ,        between each three digits (1,000,000).",
  1879. "Decimal            .        as a decimal point.",
  1880. "Precision        2        The number of digits to print after the",
  1881. "                    decimal point. This may be an integer",
  1882. "                    in the range [0-14] or `float'.",
  1883. "                    `float' means use however many digits",
  1884. "                    are needed, or however many will fit,",
  1885. "                    whichever is less.",
  1886. "Scale            1        What to multiply the value by before",
  1887. "                    printing. Most often this will be one,",
  1888. "                    but it might be 100 if you're printing",
  1889. "                    percentages, or .000001 if you're",
  1890. "                    printing in megabucks.  (Beware of",
  1891. "                    overflow!)",
  1892. "",
  1893. "Do not use digits for the headers, trailers, the comma, or the decimal point",
  1894. "symbol.  Using digits will confuse the internal routines and produce",
  1895. "incomprehensible results.   (This is a bug that will be fixed.)",
  1896. #endif
  1897.  
  1898.  
  1899.  
  1900. /* help commands */
  1901.  
  1902. DEFUN ("describe-key-briefly",
  1903.        FDbrief_describe_key, FAbrief_describe_key, brief_describe_key)
  1904. #ifdef FUNC_ARG_STRINGS
  1905. "kDescribe key briefly? ",
  1906. #endif
  1907. #ifdef DOC_STRINGS
  1908. "Print the name of the function KEYSEQ invokes.",
  1909. #endif
  1910.  
  1911. DEFUN ("describe-key",
  1912.        FDdescribe_key, FAdescribe_key, describe_key)
  1913. #ifdef FUNC_ARG_STRINGS
  1914. "kDescribe key? ",
  1915. #endif
  1916. #ifdef DOC_STRINGS
  1917. "Display the full documentation of the function KEYSEQ invokes.",
  1918. #endif
  1919.  
  1920. DEFUN ("describe-function",
  1921.        FDdescribe_function, FAdescribe_function, describe_function)
  1922. #ifdef FUNC_ARG_STRINGS
  1923. "CDescribe function? ",
  1924. #endif
  1925. #ifdef DOC_STRINGS
  1926. "Display the full documentation of FUNCTION (a symbol).",
  1927. #endif
  1928.  
  1929. DEFUN_5 ("describe-formula", FDdescribe_formula, FAdescribe_formula,
  1930.      DFdescribe_formula, view_info)
  1931. #ifdef FUNC_ARG_STRINGS
  1932. "SHelp with what formula function? ",
  1933. "mview-info", 
  1934. #endif
  1935. #ifdef FUNC_INIT_CODE
  1936. "{insert-context-word}",
  1937. "{builtin-help %0}",
  1938. #endif
  1939. #ifdef DOC_STRINGS
  1940. "Display the documentation for the given formula FUNCTION",
  1941. #endif
  1942.  
  1943. DEFUN_3 ("help-with-command", FAhelp_with_command, help_with_command)
  1944. #ifdef DOC_STRINGS
  1945. "Display help for the currently executing command.",
  1946. #endif
  1947.  
  1948.  
  1949. DEFUN ("where-is", FDwhere_is, FAwhere_is, where_is)
  1950. #ifdef FUNC_ARG_STRINGS
  1951. "SCommand or keymap? ",
  1952. #endif
  1953. #ifdef DOC_STRINGS
  1954. "Print message listing a key sequence that invokes a specified command.",
  1955. "Argument is a command name or keymap name.  If a keymap name is given,",
  1956. "then the output tells what prefix select that keymap.",
  1957. #endif
  1958.  
  1959. DEFUN ("builtin-help", FDbuiltin_help, FAbuiltin_help, builtin_help)
  1960. #ifdef FUNC_ARG_STRINGS
  1961. "SHelp for what symbol? ",
  1962. #endif
  1963. #ifdef DOC_STRINGS
  1964. "(Internal use -- probably not useful as a command.)",
  1965. "Make one of the help messages built-in to Oleo the current prompt-info.",
  1966. #endif
  1967.  
  1968. DEFUN ("write-info", FDwrite_info, FAwrite_info, write_info)
  1969. #ifdef FUNC_ARG_STRINGS
  1970. "SWrite what info buffer? ",
  1971. "fwWrite %0 to what file? ",
  1972. #endif
  1973. #ifdef DOC_STRINGS
  1974. "(internal use) Write the info buffer NAME to FILE.",
  1975. #endif
  1976.  
  1977.  
  1978. DEFUN_3 ("make-wallchart-info", FAmake_wallchart_info, make_wallchart_info)
  1979. #ifdef DOC_STRINGS
  1980. "(Internal use -- probably not useful as a command.)",
  1981. "Ensure the existence of an info buffer named `wallchart'.",
  1982. "The buffer will contain a categoricly organized list of keybindings.",
  1983. #endif
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989. /* Temporary hacks for multi-line text display. */
  1990.  
  1991. DEFUN ("set-info", FDset_info, FAset_info, set_info)
  1992. #ifdef FUNC_ARG_STRINGS
  1993. "SDisplay what info? ",
  1994. #endif
  1995. #ifdef DOC_STRINGS
  1996. "(internal use -- probably not useful as an interactie command).",
  1997. "Display the info-buffer ARG instead of the cell windows.",
  1998. "Display-cells undoes this.",
  1999. #endif
  2000.  
  2001. DEFUN ("display-cells", FDdisplay_cells, FAdisplay_cells, set_info)
  2002. #ifdef FUNC_ARG_STRINGS
  2003. "#0",
  2004. #endif
  2005. #ifdef DOC_STRINGS
  2006. "(internal use -- probably not useful as an interactie command).",
  2007. "Display the cells windows instead of an info buffer. This is the",
  2008. "opposite of set-info.",
  2009. #endif
  2010.  
  2011. DEFUN_5 ("view-info", FDview_info, FAview_info, DFview_info, view_info)
  2012. #ifdef FUNC_ARG_STRINGS
  2013. "sInfo to view? ", 
  2014. "mview-info",
  2015. #endif
  2016. #ifdef FUNC_INIT_CODE
  2017. 0,
  2018. "{set-info %0}",
  2019. #endif
  2020. #ifdef DOC_STRINGS
  2021. "(internal use only -- probably not useful as an interactive command).",
  2022. "Let the user page through the info buffer named ARG.",
  2023. #endif
  2024.  
  2025. DEFUN ("page-info", FDpage_info, FApage_info, page_info)
  2026. #ifdef FUNC_ARG_STRINGS
  2027. "p",
  2028. #endif
  2029. #ifdef DOC_STRINGS
  2030. "Move forward a page in an info text.  With a prefix, move that many pages.",
  2031. #endif
  2032.  
  2033. DEFUN ("page-info-backwards",
  2034.        FDpage_info_backwards, FApage_info_backwards, page_info_backwards)
  2035. #ifdef FUNC_ARG_STRINGS
  2036. "p",
  2037. #endif
  2038. #ifdef DOC_STRINGS
  2039. "Move backward a page in an info text.  With a prefix, move that many pages.",
  2040. #endif
  2041.  
  2042.  
  2043.  
  2044. /* Graph commands */
  2045.  
  2046. DEFUN_3 ("graph-x11-mono", FDgraph_x11_mono, graph_x11_mono)
  2047. #ifdef DOC_STRINGS
  2048. "Specify that graphing should be done to an X11 window in black and white.",
  2049. #endif
  2050.  
  2051. DEFUN_3 ("graph-x11-color", FDgraph_x11_color, graph_x11_color)
  2052. #ifdef DOC_STRINGS
  2053. "Specify that graphing should be done to an X11 window in color.",
  2054. #endif
  2055.  
  2056. DEFUN ("graph-toggle-axis-logness",
  2057.        FDgraph_toggle_x_logness, FAgraph_toggle_x_logness, graph_set_logness)
  2058. #ifdef FUNC_ARG_STRINGS
  2059. "[xXyY]Which axis? (`x' or `y') ",
  2060. "p?",
  2061. "p",
  2062. #endif
  2063. #ifdef DOC_STRINGS
  2064. "Toggle whether AXIS (`x' or `y') is drawn to a logarithmic scale.",
  2065. "With a 0 or negative prefix, make the axis not be logarithmic.",
  2066. "With a positive prefix, make the axis logarithmic.",
  2067. #endif
  2068.  
  2069.  
  2070. DEFUN ("graph-postscript",
  2071.        FDgraph_postscript, FAgraph_postscript, graph_postscript)  
  2072. #ifdef FUNC_ARG_STRINGS
  2073. "fnWrite postscript graph to? ",
  2074. "[ledLED][L]andscape  [E]mbedded postscript  or [D]efault",
  2075. "[cCmM][C]olor  or [M]onochrome",
  2076. "sPostscript font? ", 
  2077. "nPoint size? ",
  2078. #endif
  2079. #ifdef DOC_STRINGS
  2080. "Specify that graphing should be done in postscript.",
  2081. "Arguments are:",
  2082. "  FILE - the output file for the postscript (may be a pipe, e.g.: `| lpr').",
  2083. "  KIND - [l]andscape, [e]mbedded postscript or [d]efault",
  2084. "  COLOR - [b]lack and white,  or [c]olor",
  2085. "  FONT - a font name (e.g.: TimesRoman)",
  2086. "  PTSIZ - point size for labels.",
  2087. #endif
  2088.  
  2089. DEFUN ("graph-set-axis-low",
  2090.        FDgraph_set_axis_low, FAgraph_set_axis_low, graph_set_axis_lo)
  2091. #ifdef FUNC_ARG_STRINGS
  2092. "[xXyY]Set range start for which axis? (`x' or `y') ",
  2093. "sBeginning of the X axis range [a number or `def']? ",
  2094. #endif
  2095. #ifdef DOC_STRINGS
  2096. "Set the beginning of the range graph on AXIS to LOW.",
  2097. "LOW may be either a real number, or `def' to invoke auto-scaling.",
  2098. #endif
  2099.  
  2100. DEFUN ("graph-set-axis-high",
  2101.        FDgraph_set_axis_high, FAgraph_set_axis_high, graph_set_axis_hi)
  2102. #ifdef FUNC_ARG_STRINGS
  2103. "[xXyY]Set range start for which axis? (`x' or `y') ",
  2104. "sBeginning of the X axis range [a number or `def']? ",
  2105. #endif
  2106. #ifdef DOC_STRINGS
  2107. "Set the beginning of the range graph on AXIS to HIGH.",
  2108. "HIGH may be either a real number, or `def' to invoke auto-scaling.",
  2109. #endif
  2110.  
  2111. DEFUN ("graph-set-x-axis-symbolic", FDgraph_set_axis_symbolic,
  2112.        FAgraph_set_axis_symbolic, graph_set_axis_symbolic)
  2113. #ifdef FUNC_ARG_STRINGS
  2114. "c#x",
  2115. "rSymbols for the %0-axis in range? ",
  2116. "cRead rows or cols in %1? (`r' or `c') ",
  2117. #endif
  2118. #ifdef DOC_STRINGS
  2119. "Declare that the x-axis should range over the names in RANGE read in ORDER.",
  2120. "RANGE should be a set of cells containing the symbols for the x-axis.",
  2121. "The values in those cells correspond to positions in the range being",
  2122. "graphed (e.g.: the cells might contain the names of the months).",
  2123. "ORDER (either `r' or `c') says whether cells should be read row-wise",
  2124. "or column-wise.",
  2125. "",
  2126. "After this command, two kinds of data-sets can be plotted.",
  2127. "Datasets which are explicitly made up of pairs of cells should contain",
  2128. "X values that can be found in RANGE.  Datasets with an implicit X coordinate",
  2129. "will be be proviced with X coordinates from RANGE in the specified order.",
  2130. "",
  2131. "For non-symbolic ranges, use [graph-set-axis-low]",
  2132. ""
  2133. "For symbolic labels on a numeric range, use [graph-set-axis-labels]",
  2134. #endif
  2135.  
  2136. DEFUN ("graph-set-axis-labels", FDgraph_set_axis_labels,
  2137.        FAgraph_set_axis_labels, graph_set_axis_labels)
  2138. #ifdef FUNC_ARG_STRINGS
  2139. "[xXyY]Labels for which axis? (`x' or `y') ",
  2140. "rRead labels for the %0-axis from range? ",
  2141. "[hHvViI]Are position/label pairs [H]oriz, [V]ert, or [I]mplicit-position? ",
  2142. "[rRcC]Read labels from %0 row-wise or column-wise? (`r',or `c') ",
  2143. #endif
  2144. #ifdef DOC_STRINGS
  2145. "Read labels for AXIS from RNG as ORIENTATION pos/label pairs read in ORDER.",
  2146. "",
  2147. "AXIS may be either `x' or `y'.",
  2148. "",
  2149. "ORIENTATION may be:",
  2150. "    `h' - horizontal    if rc contains the position, then rc[1]",
  2151. "                contains the label.",
  2152. "    `v' - vertical        if rc contains the position, then r[1]c",
  2153. "                contains the label.",
  2154. "    `i' - implicit        every cell is a label; positions are assigned",
  2155. "                non-negative integer positions (0, 1, 2...)",
  2156. "",
  2157. "ORDER may be:",
  2158. "    `r' - rows        pairs are read row-wise",
  2159. "    `c' - columns        pairs are read column-wise",
  2160. "",
  2161. "This command does not effect what range will be graphed.  If labels are",
  2162. "assigned positions outside the visible range, they will not be drawn.",
  2163. "See also graph-set-x-symbolic.",
  2164. "This is undone by [graph-default-axis-labels]",
  2165. #endif
  2166.  
  2167. DEFUN ("graph-default-axis-labels", FAgraph_default_axis_labels,
  2168.        FDgraph_default_axis_labels, graph_default_axis_labels)
  2169. #ifdef FUNC_ARG_STRINGS
  2170. "[xXyY]Use default labels for which axis? (`x' or `y') ",
  2171. #endif
  2172. #ifdef DOC_STRINGS
  2173. "Reset the labels for AXIS to their defaults.",
  2174. "This undoes [graph-set-axis-labels]",
  2175. #endif
  2176.  
  2177.  
  2178. DEFUN ("graph-set-style",
  2179.        FDgraph_set_style, FAgraph_set_style, graph_set_style)
  2180. #ifdef FUNC_ARG_STRINGS
  2181. "N[0,9]Set style for which dataset? (0..9) ",
  2182. "sStyle for dataset %0? ",
  2183. #endif
  2184. #ifdef DOC_STRINGS
  2185. "Specify that dataset N should be graphed in STYLE.",
  2186. "STYLE may be any of the gnuplot graph types: ",
  2187. "    lines, points, linespoints, impulses, dots",
  2188. #endif
  2189.  
  2190. DEFUN ("graph-set-axis-title",
  2191.        FDgraph_set_axis_title, FAgraph_set_axis_title, graph_set_axis_title)
  2192. #ifdef FUNC_ARG_STRINGS
  2193. "[xyXY]Set title of which axis? (x or y) ",
  2194. "sTitle for the %0-axis? ",
  2195. #endif
  2196. #ifdef DOC_STRINGS
  2197. "When drawing graphs, label AXIS (`x' or `y') with TITLE.",
  2198. #endif
  2199.  
  2200. DEFUN ("graph-set-data", FDgraph_set_data, FAgraph_set_data, graph_set_data)
  2201. #ifdef FUNC_ARG_STRINGS
  2202. "N[0,9]Set which dataset? (0..9) ",
  2203. "rRead dataset %0 from what range? ",
  2204. "[hHvViI]Are X,Y pairs [H]oriz, [V]ert, or [I]mplicit-X? ",
  2205. "[rRcC]Read labels from %0 row-wise or column-wise? (`r',or `c') ",
  2206. #endif
  2207. #ifdef DOC_STRINGS
  2208. "Specify that dataset N is read from RNG as ORNT x,y pairs read in ORDER",
  2209. "",
  2210. "Datasets are numbered 0..9.",
  2211. "",
  2212. "ORIENTATION may be:",
  2213. "    `h' - horizontal    if rc contains x, then rc[1] contains y",
  2214. "    `v' - vertical        if rc    \"     x,   \"  r[1]c    \"     y",
  2215. "    `i' - implicit        every cell is a y value; x coordinates are",
  2216. "                non-negative integer positions (0, 1, 2...)",
  2217. "",
  2218. "ORDER may be:",
  2219. "    `r' - rows        pairs are read row-wise",
  2220. "    `c' - columns        pairs are read column-wise",
  2221. "",
  2222. #endif
  2223.  
  2224. DEFUN ("graph-set-data-title",
  2225.        FDgraph_set_data_title, FAgraph_set_data_title, graph_set_data_title)
  2226. #ifdef FUNC_ARG_STRINGS
  2227. "N[0,9]Set the title for which dataset? (0..9) ",
  2228. "sTitle for dataset %0? ",
  2229. #endif
  2230. #ifdef DOC_STRINGS
  2231. "Specify that dataset N should be called TITLE. ",
  2232. "The title will be printed in the key for the graph.",
  2233. #endif
  2234.  
  2235. DEFUN_3 ("graph-presets", FDgraph_presets, graph_presets)
  2236. #ifdef DOC_STRINGS
  2237. "Return graphing parameters to their default values.",
  2238. "This does not effect the datasets selected for graphing.",
  2239. #endif
  2240.  
  2241. DEFUN_3 ("graph-clear-datasets", FDgraph_clear_datasets, graph_clear_datasets)
  2242. #ifdef DOC_STRINGS
  2243. "Erase the settings of which datasets will be graphed.",
  2244. "This undoes the effects of all previous invocations of [graph-set-data].",
  2245. #endif
  2246.  
  2247. DEFUN_3 ("graph-make-info", FDgraph_make_info, graph_make_info)  
  2248. #ifdef DOC_STRINGS
  2249. "Update the info-buffer called `graphing-parameters'.",
  2250. "The new contents of the buffer will describe the current settings",
  2251. "of all graphing parameters",
  2252. #endif
  2253.  
  2254. DEFUN_3 ("graph-plot", FDgraph_plot, graph_plot)
  2255. #ifdef DOC_STRINGS
  2256. "Execute a graph.  The parameter of the graph are set using [graph-setup]",
  2257. #endif
  2258.  
  2259.