File: init.c

package info (click to toggle)
oleo 1.6-16
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,640 kB
  • ctags: 3,139
  • sloc: ansic: 39,221; yacc: 1,737; sh: 362; makefile: 88
file content (604 lines) | stat: -rw-r--r-- 22,661 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
/*	Copyright (C) 1993 Free Software Foundation, Inc.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this software; see the file COPYING.  If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "proto.h"
#include "init.h"
#include "global.h"
#include "io-term.h"
#include "utils.h"
#include "cmd.h"
/*
 * These commands are run before we are ready to do output.  They
 * should not do any kind of io or cause errors.  If they do, you
 * will experience core dumps.
 */
char *init_cmds[] =
{
  "",
  "# The keymap tree.",
  "",
  "# The map `universal' already exists, and is always the keymap of last",
  "# resort.  It is almost always a bad idea to add new bindings there.",
  "",
  "# This is the generic top-level keymap.   It should contain bindings that",
  "# apply at the top level keymap regardless of what mode the editor is in.",
  "# All keymaps that are used at the top level should inerit from this.",
  "create-keymap generic-main universal",
  "",
  "# This is the keymap in force at the top level when no command arguments are",
  "# being edited.",
  "create-keymap main generic-main",
  "",
  "# The keymap after a M- or ESC prefix in main:",
  "create-keymap generic-meta universal",
  "create-keymap meta generic-meta",
  "",
  "# The keymap for ESC [, Arrow keys are bound in this map.",
  "create-keymap generic-ansi universal",
  "create-keymap ansi generic-ansi",
  "",
  "create-keymap generic-trolx universal",
  "create-keymap trolx generic-trolx",
  "",
  "# Bindings that define prefix keys.",
  "bind-key generic-main generic-meta ^[",
  "bind-key main meta ^[",
  "",
  "create-keymap mouse universal",
  "bind-key generic-main mouse ^\\\\",
  "bind-key mouse mouse-goto 0",
  "bind-key mouse mouse-mark 1",
  "bind-key mouse mouse-mark-and-goto 2",
  "",
  "",
  "bind-key generic-main generic-trolx ^x",
  "bind-key main trolx ^x",
  "",
  "bind-key generic-meta generic-ansi [",
  "bind-key meta ansi [",
  "",
  "# Misc generic commands",
  "",
  "bind-key universal break ^g",
  "bind-key universal redraw-screen ^l",
  "bind-key generic-main universal-argument ^u",
  "bind-key generic-main suspend-oleo ^z",
  "bind-key generic-trolx kill-oleo ^c",
  "bind-key generic-trolx recalculate !",
  "bind-key generic-meta execute-command x",
  "",
  "# Prefix argument handling",
  "# This keymap is magicly invoked within command_loop in cmd.c.",
  "create-keymap prefix universal",
  "bind-set prefix universal-argument 0-9",
  "bind-key prefix universal-argument -",
  "",
  "#",
  "# Cursor motion",
  "#",
  "",
  "# For EMACS users",
  "# Notice that these motion commands are not bound genericly.  They don't",
  "# in general apply if the input area is active.",
  "",
  "bind-key main    up-cell  ^p",
  "bind-key main right-cell  ^f",
  "bind-key main  left-cell  ^b",
  "bind-key main  down-cell  ^n",
  "",
  "# Ansi motion.",
  "bind-key generic-ansi up-cell A",
  "bind-key generic-ansi down-cell B",
  "bind-key generic-ansi right-cell C",
  "bind-key generic-ansi left-cell D",
  "",
  "# These are only useful under X, but there, they are quite useful.",
  "name-macro-string up-cell-and-edit \\",
  "{exit-minibuffer}{up-cell}{edit-cell}",
  "name-macro-string down-cell-and-edit \\",
  "{exit-minibuffer}{down-cell}{edit-cell}",
  "name-macro-string left-cell-and-edit \\",
  "{exit-minibuffer}{left-cell}{edit-cell}",
  "name-macro-string right-cell-and-edit \\",
  "{exit-minibuffer}{right-cell}{edit-cell}",
  "",
  "create-keymap edit-ansi generic-ansi",
  "bind-key edit-ansi up-cell-and-edit A",
  "bind-key edit-ansi down-cell-and-edit B",
  "bind-key edit-ansi forward-char C",
  "bind-key edit-ansi backward-char D",
  "",
  "create-keymap meta-edit-ansi universal",
  "bind-key edit-ansi meta-edit-ansi ^[",
  "bind-key meta-edit-ansi up-cell-and-edit A",
  "bind-key meta-edit-ansi down-cell-and-edit B",
  "bind-key meta-edit-ansi right-cell-and-edit C",
  "bind-key meta-edit-ansi left-cell-and-edit D",
  "",
  "bind-key trolx goto-cell j",
  "bind-key meta goto-region j",
  "",
  "# Going to extremes",
  "bind-key meta upper-left <",
  "bind-key meta lower-right >",
  "",
  "# Marking time",
  "bind-key trolx exchange-point-and-mark ^X",
  "bind-key main mark-cell ^@",
  "",
  "# Scrolling commands.",
  "bind-key meta scroll-up v",
  "bind-key main scroll-down ^V",
  "bind-key trolx scroll-right >",
  "bind-key trolx scroll-left <",
  "",
  "# Other ways of moving the cell cursor.",
  "",
  "bind-key meta scan-up p",
  "bind-key meta scan-down n",
  "bind-key meta scan-left b",
  "bind-key meta scan-right f",
  "",
  "bind-key main beginning-of-row ^a",
  "bind-key main end-of-row ^e",
  "bind-key meta beginning-of-col ^a",
  "bind-key meta end-of-col ^e",
  "",
  "# Macros",
  "bind-key generic-trolx start-entering-macro (",
  "bind-key generic-trolx stop-entering-macro )",
  "bind-key generic-trolx call-last-kbd-macro e",
  "bind-key generic-trolx store-last-macro =",
  "",
  "# The keymap used when prompting for a key-sequence: ",
  "create-keymap read-keyseq universal",
  "bind-set read-keyseq self-map-command \\000-\\377",
  "",
  "# Help commands",
  "create-keymap generic-help universal",
  "create-keymap unprompted-help generic-help",
  "create-keymap help generic-help",
  "bind-key generic-main unprompted-help ^h",
  "bind-key main help ^h",
  "bind-key unprompted-help help ^h",
  "bind-key unprompted-help help ?",
  "",
  "set-map-prompt help \\",
  "Help keys (type ? for more explanation): C c f F k o v w W ^W",
  "",
  "bind-key generic-help help-with-command C",
  "bind-key generic-help describe-key-briefly c",
  "bind-key generic-help describe-function f",
  "bind-key generic-help describe-formula F",
  "bind-key generic-help describe-key k",
  "bind-key generic-help show-options o",
  "bind-key generic-help show-variable v",
  "bind-key generic-help show-all-variables ^v",
  "bind-key generic-help where-is w",
  "",
  "name-macro-string view-wallchart \\",
  "{make-wallchart-info}{with-keymap view-info}{set-info wallchart}",
  "bind-key generic-help view-wallchart W",
  "",
  "name-macro-string write-wallchart \\",
  "{make-wallchart-info}{write-info wallchart}",
  "bind-key generic-help write-wallchart ^w",
  "",
  "create-keymap verbose-help-map generic-help",
  "set-map-prompt verbose-help-map \\",
  "Help (+,-,ESC or one of the help characters): ",
  "",
  "",
  "name-macro-string verbose-help \\",
  "  {with-keymap verbose-help-map}{builtin-help help-with-help}",
  "",
  "bind-key help verbose-help ^h",
  "bind-key help verbose-help ?",
  "",
  "bind-key verbose-help-map exit-minibuffer ^[",
  "bind-key verbose-help-map page-info +",
  "bind-key verbose-help-map page-info-backwards -",
  "",
  "name-macro-string verbose-hwc {exit-minibuffer}{help-with-command}",
  "name-macro-string verbose-dkb {exit-minibuffer}{describe-key-briefly}",
  "name-macro-string verbose-df {exit-minibuffer}{describe-function}",
  "name-macro-string verbose-dk {exit-minibuffer}{describe-key}",
  "name-macro-string verbose-so {exit-minibuffer}{show-options}",
  "name-macro-string verbose-sv {exit-minibuffer}{show-variable}",
  "name-macro-string verbose-sav {exit-minibuffer}{show-all-variables}",
  "name-macro-string verbose-w {exit-minibuffer}{where-is}",
  "",
  "bind-key verbose-help-map verbose-hwc C",
  "bind-key verbose-help-map verbose-dkb c",
  "bind-key verbose-help-map verbose-df  f",
  "bind-key verbose-help-map verbose-dk  k",
  "bind-key verbose-help-map verbose-so  o",
  "bind-key verbose-help-map verbose-sv  v",
  "bind-key verbose-help-map verbose-sav ^v",
  "bind-key verbose-help-map verbose-w   w",
  "",
  "",
  "# Variables",
  "bind-key trolx set-variable :",
  "",
  "# Files",
  "",
  "bind-key generic-trolx save-spreadsheet ^s",
  "bind-key trolx find-alternate-spreadsheet ^v",
  "bind-key trolx merge-spreadsheet i",
  "",
  "bind-key meta copy-region c",
  "bind-key meta copy-values-in-region ^c",
  "bind-key meta move-region m",
  "bind-key main insert-row ^o",
  "bind-key meta insert-col o",
  "bind-key main delete-row ^k",
  "bind-key meta delete-col k",
  "",
  "# Changing cell formulas",
  "bind-key main set-cell =",
  "",
  "# Some characters start editing the current cell and then are reinterpreted",
  "# as editing commands:",
  "bind-set main goto-edit-cell a-z",
  "bind-set main goto-edit-cell A-Z",
  "bind-set main goto-edit-cell 0-9",
  "bind-key main goto-edit-cell \\",
  "bind-key main goto-edit-cell +",
  "bind-key main goto-edit-cell -",
  "bind-key main goto-edit-cell *",
  "bind-key main goto-edit-cell /",
  "bind-key main goto-edit-cell (",
  "bind-key main goto-edit-cell )",
  "bind-key main goto-edit-cell @",
  "bind-key main goto-edit-cell ^",
  "bind-key main goto-edit-cell %",
  "bind-key main goto-edit-cell >",
  "bind-key main goto-edit-cell <",
  "bind-key main goto-edit-cell !",
  "bind-key main goto-edit-cell ?",
  "bind-key main goto-edit-cell :",
  "bind-key main goto-edit-cell #",
  "bind-key main goto-edit-cell _",
  "bind-key main goto-edit-cell .",
  "bind-key main goto-edit-cell ,",
  "bind-key main goto-edit-cell ;",
  "bind-key main goto-edit-cell  \"",
  "bind-key meta set-region-formula =",
  "bind-key main delete-cell ^?",
  "bind-key meta delete-region ^?",
  "",
  "",
  "# Window commands",
  "",
  "bind-key meta recenter-window ^l",
  "bind-key trolx split-window-horizontally 5",
  "bind-key trolx split-window-vertically 2",
  "bind-key trolx delete-window 0",
  "bind-key trolx delete-other-windows 1",
  "bind-key meta goto-minibuffer ^",
  "bind-key trolx other-window o",
  "",
  "# Command argument editing",
  "",
  "create-keymap read-string generic-main",
  "create-keymap meta-read-string generic-meta",
  "create-keymap trolx-read-string generic-trolx",
  "",
  "bind-key read-string meta-read-string ^[",
  "bind-set read-string self-insert-command \\ -~",
  "bind-key read-string exit-minibuffer ^m",
  "bind-key read-string beginning-of-line ^a",
  "bind-key read-string end-of-line ^e",
  "bind-key read-string backward-char ^b",
  "bind-key meta-read-string backward-word b",
  "bind-key read-string backward-delete-char ^?",
  "bind-key meta-read-string backward-delete-word ^?",
  "bind-key read-string forward-char ^f",
  "bind-key meta-read-string forward-word f",
  "bind-key read-string delete-char ^d",
  "bind-key meta-read-string delete-word d",
  "bind-key read-string kill-line ^k",
  "bind-key meta-read-string insert-cell-expression e",
  "bind-key meta-read-string insert-cell-value v",
  "bind-key meta-read-string insert-rel-ref r",
  "bind-key meta-read-string insert-abs-ref a",
  "bind-key meta-read-string toggle-overwrite o",
  "",
  "bind-key read-string trolx-read-string ^x",
  "bind-key trolx-read-string other-window o",
  "",
  "# Reading various argument types specificly",
  "create-keymap read-symbol read-string",
  "create-keymap read-word read-string",
  "create-keymap read-range read-string",
  "create-keymap read-filename read-string",
  "create-keymap read-integer read-string",
  "create-keymap read-float read-string",
  "create-keymap read-formula read-string",
  "",
  "# Special arrow key meanings for edit mode",
  "create-keymap meta-read-formula meta-read-string",
  "bind-key read-formula meta-read-formula ^[",
  "bind-key meta-read-formula edit-ansi [",
  "",
  "# auto-motion",
  "create-keymap set-auto-motion universal",
  "set-map-prompt set-auto-motion \\",
  "Set auto-motion direction [^v<>`'/\\ or SPC for none] ",
  "",
  "bind-key generic-trolx set-auto-motion m",
  "",
  "bind-key set-auto-motion auto-move-up ^",
  "bind-key set-auto-motion auto-move-down v",
  "bind-key set-auto-motion auto-move-down V",
  "bind-key set-auto-motion auto-move-left <",
  "bind-key set-auto-motion auto-move-left ,",
  "bind-key set-auto-motion auto-move-right >",
  "bind-key set-auto-motion auto-move-right .",
  "bind-key set-auto-motion auto-move-up-right '",
  "bind-key set-auto-motion auto-move-up-left `",
  "bind-key set-auto-motion auto-move-down-right \\\\   ",
  "bind-key set-auto-motion auto-move-down-left  /",
  "bind-key set-auto-motion auto-move-no-motion \\ ",
  "",
  "bind-key read-formula next-edit ^i",
  "bind-key read-formula next-edit-set ^j",
  "",
  "create-keymap read-most-chars universal",
  "",
  "bind-set read-most-chars exit-self-inserting \\000-\\377",
  "bind-key read-most-chars break ^G",
  "bind-key read-most-chars redraw-screen ^L",
  "",
  "create-keymap press-any universal",
  "set-map-prompt press-any \\",
  "Press any key to continue. ",
  "bind-set press-any exit-minibuffer \\000-\\377",
  "bind-key press-any break ^G",
  "bind-key press-any redraw-screen ^L",
  "",
  "create-keymap read-char read-most-chars",
  "bind-key read-char exit-self-inserting ^G",
  "",
  "",
  "# Menu driven commands use this keymap to read menu selections",
  "create-keymap read-menu read-most-chars",
  "bind-key read-menu help-with-command ^h",
  "",
  "create-keymap read-format read-string",
  "",
  "# These maps are used to manipulate cell attributes.",
  "# They reimplement the old format-cell, format-region and",
  "# set-default commands.",
  "",
  "create-keymap set-cell-attr 	universal",
  "create-keymap set-region-attr 	universal",
  "create-keymap set-default-attr 	universal",
  "",
  "set-map-prompt set-cell-attr \\",
  "Set cell [A]lignment [F]ormat f[O]nt [P]rotection [H]eight [W]idth",
  "set-map-prompt set-region-attr \\",
  "Set region [A]lignment [F]ormat f[O]nt [P]rotection [H]eight [W]idth",
  "set-map-prompt set-default-attr \\",
  "Set default [A]lignment [F]ormat f[O]nt [P]rotection [H]eight [W]idth",
  "",
  "bind-key meta set-default-attr d",
  "bind-key meta set-region-attr r",
  "bind-key meta set-cell-attr a",
  "",
  "bind-key set-cell-attr	set-cell-alignment	a",
  "bind-key set-cell-attr	set-cell-format		f",
  "bind-key set-cell-attr	set-cell-font		o",
  "bind-key set-cell-attr	set-cell-protection	p",
  "bind-key set-cell-attr	set-cell-height		h",
  "bind-key set-cell-attr	set-cell-width		w",
  "bind-key set-cell-attr	set-cell-alignment	A",
  "bind-key set-cell-attr	set-cell-format		F",
  "bind-key set-cell-attr	set-cell-font		O",
  "bind-key set-cell-attr	set-cell-protection	P",
  "bind-key set-cell-attr	set-cell-height		H",
  "bind-key set-cell-attr	set-cell-width		W",
  "",
  "bind-key set-region-attr	set-region-alignment		a",
  "bind-key set-region-attr	set-region-format		f",
  "bind-key set-region-attr	set-region-font			o",
  "bind-key set-region-attr	set-region-protection		p",
  "bind-key set-region-attr	set-region-height		h",
  "bind-key set-region-attr	set-region-width		w",
  "bind-key set-region-attr	set-region-alignment		A",
  "bind-key set-region-attr	set-region-format		F",
  "bind-key set-region-attr	set-region-font			O",
  "bind-key set-region-attr	set-region-protection		P",
  "bind-key set-region-attr	set-region-height		H",
  "bind-key set-region-attr	set-region-width		W",
  "",
  "bind-key set-default-attr	set-default-alignment		a",
  "bind-key set-default-attr	set-default-format		f",
  "bind-key set-default-attr	set-default-font		o",
  "bind-key set-default-attr	set-default-protection		p",
  "bind-key set-default-attr	set-default-height		h",
  "bind-key set-default-attr	set-default-width		w",
  "bind-key set-default-attr	set-default-alignment		A",
  "bind-key set-default-attr	set-default-format		F",
  "bind-key set-default-attr	set-default-font		O",
  "bind-key set-default-attr	set-default-protection		P",
  "bind-key set-default-attr	set-default-height		H",
  "bind-key set-default-attr	set-default-width		W",
  "",
  "create-keymap view-info universal",
  "bind-key view-info exit-minibuffer ^[",
  "bind-key view-info page-info \\ ",
  "bind-key view-info page-info +",
  "bind-key view-info page-info-backwards -",
  "",
  "set-map-prompt view-info \\",
  "+ (forward page)   - (backward page)   ESC (return to spreadsheet editing)",
  "",
  "",
  "",
  "",
  "",
  "# Verbose menu type keymaps use exit-minibuffer to move closer",
  "# to the root of the menu.",
  "",
  "create-keymap generic-menu universal",
  "bind-key generic-menu exit-minibuffer ^[",
  "bind-key generic-menu exit-minibuffer ^m",
  "bind-key generic-menu exit-minibuffer ^j",
  "",
  "# Graphing with gnuplot",
  "",
  "create-keymap graph-commands generic-menu",
  "name-macro-string graph-setup \\",
  " {with-keymap graph-commands}{builtin-help graphing}",
  "bind-key generic-meta graph-setup g",
  "set-map-prompt graph-commands \\",
  "(R C o x y t d s p Esc)? ",
  "",
  "name-macro-string graph-preset-msg {display-error-msg Graph reset}",
  "name-macro-string graph-presets-verbosely \\",
  "{graph-presets}{graph-preset-msg}{set-info _expanded__info_graphing}",
  "bind-key graph-commands graph-presets-verbosely R",
  "",
  "name-macro-string graph-clear-msg {display-error-msg Graph data reset}",
  "name-macro-string graph-clear-verbosely \\",
  "{graph-clear-datasets}{graph-clear-msg}{set-info _expanded__info_graphing}",
  "bind-key graph-commands graph-clear-verbosely C",
  "",
  "bind-key graph-commands graph-set-data-title t",
  "bind-key graph-commands graph-set-data d",
  "bind-key graph-commands graph-set-style s",
  "bind-key graph-commands graph-plot p",
  "",
  "create-keymap view-graphing-parameters view-info",
  "name-macro-string graph-verify \\",
  "{graph-make-info}{with-keymap view-graphing-parameters}{set-info graphing-parameters}",
  "bind-key graph-commands graph-verify v",
  "set-map-prompt view-graphing-parameters \\",
  "+ (forward page)   - (backward page)   p (plot)  or  ESC",
  "bind-key view-graphing-parameters graph-plot p",
  "",
  "create-keymap graph-terminal-types universal",
  "name-macro-string graph-select-output \\",
  "{one-command-with-keymap graph-terminal-types}{builtin-help graph-output-types}",
  "bind-key graph-commands graph-select-output o",
  "set-map-prompt graph-terminal-types \\",
  "Graph output type (x X P): ",
  "bind-key graph-terminal-types graph-x11-mono x",
  "bind-key graph-terminal-types graph-x11-color X",
  "bind-key graph-terminal-types graph-postscript p",
  "",
  "create-keymap graph-x-axis-commands generic-menu",
  "name-macro-string graph-x-axis \\",
  "{with-keymap graph-x-axis-commands}{builtin-help graph-x-axis-help}",
  "bind-key graph-commands graph-x-axis x",
  "set-map-prompt graph-x-axis-commands X-axis (s [ ] l L Esc)",
  "",
  "name-macro-string graph-set-x-range-low {graph-set-axis-low x}",
  "name-macro-string graph-set-x-range-high {graph-set-axis-high x}",
  "bind-key graph-x-axis-commands graph-set-x-range-low [",
  "bind-key graph-x-axis-commands graph-set-x-range-high ]",
  "bind-key graph-x-axis-commands graph-set-x-axis-symbolic s",
  "name-macro-string graph-set-x-labels {graph-set-axis-labels x}",
  "bind-key graph-x-axis-commands graph-set-x-labels l",
  "name-macro-string graph-default-x-labels {graph-default-axis-labels x}",
  "bind-key graph-x-axis-commands graph-default-x-labels L",
  "",
  "create-keymap graph-y-axis-commands generic-menu",
  "name-macro-string graph-y-axis \\",
  "{with-keymap graph-y-axis-commands}{builtin-help graph-y-axis-help}",
  "bind-key graph-commands graph-y-axis y",
  "set-map-prompt graph-y-axis-commands Y-axis (s [ ] l L Esc)",
  "",
  "name-macro-string graph-set-y-range-low {graph-set-axis-low y}",
  "name-macro-string graph-set-y-range-high {graph-set-axis-high y}",
  "bind-key graph-y-axis-commands graph-set-y-range-low [",
  "bind-key graph-y-axis-commands graph-set-y-range-high ]",
  "name-macro-string graph-set-y-labels {graph-set-axis-labels y}",
  "bind-key graph-y-axis-commands graph-set-y-labels l",
  "name-macro-string graph-default-y-labels {graph-default-axis-labels y}",
  "bind-key graph-y-axis-commands graph-default-y-labels L",
  "",
  "# printing",
  "",
  "create-keymap print-commands universal",
  "bind-key meta print-commands ^p",
  "set-map-prompt print-commands \\",
  "[A]scii or [P]ostscript printing? ",
  "",
  "bind-key print-commands print-region a",
  "bind-key print-commands print-region A",
  "",
  "create-keymap psprint-commands universal",
  "bind-key print-commands psprint-commands p",
  "bind-key print-commands psprint-commands P",
  "set-map-prompt psprint-commands \\",
  "set default [F]ont   set page [S]ize   [P]rint",
  "",
  "bind-key psprint-commands set-page-size s",
  "bind-key psprint-commands set-page-size S",
  "bind-key psprint-commands set-default-ps-font f",
  "bind-key psprint-commands set-default-ps-font F",
  "bind-key psprint-commands psprint-region p",
  "bind-key psprint-commands psprint-region P",
  "",
  "",
  "# Other init commands:",
  "define-font times *times-medium-r-* Times-Roman",
  "define-font times-italic *times-medium-i-* Times-Italic",
  "define-font times-oblique *times-medium-o-* Times-Italic",
  "define-font times-bold *times-bold-r-* Times-Bold",
  "define-font times-oblique-bold *times-bold-o-* Times-BoldItalic",
  "define-font times-italic-bold *times-bold-i-* Times-BoldItalic",
  "define-font courier *courier-medium-r-* Courier",
  "define-font courier-oblique *courier-medium-o-* Courier-Italic",
  "define-font courier-bold *courier-bold-r-* Courier-Bold",
  "define-font courier-bold-oblique *courier-bold-o-* Courier-BoldItalic",
  "define-font helvetica *helvetica-medium-r-* Helvetica",
  "define-font helvetica-oblique *helvetica-medium-o-* Helvetica-Italic",
  "define-font helvetica-bold *helvetica-bold-r-* Helvetica-Bold",
  "define-font helvetica-bold-oblique *helvetica-bold-o-* Helvetica-BoldItalic",
  "define-font fixed *fixed-medium-r-* Times-Roman",

  0

};

void 
run_init_cmds (void)
{
  char **p = init_cmds;
  while (*p)
    {
      char * cmd = strdup (*p++);
      int len = strlen (cmd);
      while (len && *p && (cmd [len - 1] == '\\')
	     && ((len == 1) || cmd[len - 2] != '\\'))
	{
	  cmd [len - 1] = '\0';
	  len += strlen (*p);
	  cmd = ck_realloc (cmd, len + 1);
	  strcat (cmd, *p);
	  ++p;
	}
      execute_command (cmd);
      free (cmd);
    }
}