Debian Codegraph @

debian/jove.rc

raw
1 # This standard system-wide initialization file provides various
2 # reasonable defaults. However, it is probably best seen as a starting
3 # point, with examples of interesting possibilities, from which
4 # sysadmins can hack their own versions.
5
6 pushlibd
7
8 # This macro deletes the line containing the cursor.
9 # It is used in several of the jove.rc.TERM files and is intended
10 # for binding to the delete-line key on terminals which have it.
11 # It is placed in the kill ring for subsequent yanking.
12 define-macro kill-line ^[xbeginning-of-line^M^[xset-mark^M^[xnext-line^M^[xkill-region^M^[xpop-mark^M
13
14 # This macro sets a right margin, used below for setting a maximum row length.
15 define-macro nice-right-margin ^[xset right-margin 70^M
16
17 # Set fill mode when Jove is fired up automatically by certain
18 # mail/news readers.
19 1 auto-execute-command auto-fill-mode /tmp/\{Re\|article\|rnmail\|snd\.\|nn\.\|post\|mutt\|pn\}
20
21 # Set right margin for mail, to prevent long lines.
22 1 auto-execute-macro nice-right-margin /tmp/\{Re\|article\|rnmail\|snd\.\|nn\.\|post\|mutt\|pn\}
23
24 # The following is if you prefer fill-mode to be on for all
25 # files except the ones you want it off for (but on the other hand it could
26 # be argued that defaults in editors should be the "least surprising"
27 # alternative).
28
29 # Sets auto-fill-mode for every file and then turns it off as required.
30 # 1 auto-execute-command auto-fill-mode .*
31 # 0 auto-execute-command auto-fill-mode .*\.[lcChyfp]$\|.*\.lisp$\|.*\.scm$\|.*\.c++$
32
33 # set various language modes.
34 1 auto-execute-command c-mode .*\.[cChy]$\|.*\.c++$\|.*\.pl$
35 1 auto-execute-command lisp-mode .*\.l$\|.*\.lisp$\|.*\.scm$
36 # all the languages need show-match-mode.
37 1 auto-execute-command show-match-mode .*\.[lcChyfp]$\|.*\.lisp$\|.*\.scm$\|.*\.c++$\|.*\.pl$
38
39 # if you have job control, this puts Jove out of the way temporarily.
40 bind-to-key pause-jove ^[S
41 bind-to-key pause-jove ^[s
42
43 # This is for the shell window. Supports sh, csh and ksh.
44 set process-prompt ^[^%$#]*[%$#]
45
46 # The following apply to shell windows. Note the use of ^C^C, ^C^D etc.,
47 # thus leaving ^D available for delete-next-character.
48 # This conforms to current emacs usage.
49 ifvar jove-features .*:iproc:
50 process-bind-to-key interrupt-process ^C^C
51 process-bind-to-key eof-process ^C^D
52 process-bind-to-key quit-process ^C^\
53 process-bind-to-key stop-process ^C^Z
54 process-bind-to-key dstop-process ^C^Y
55
56 # A plethora of programs now unilaterally try to color
57 # their output using ANSI color sequences, and all
58 # have different ways to turn that off, sigh.
59 iproc-env-export INSIDE_JOVE=iproc
60 iproc-env-export TERM=dumb
61 iproc-env-unset COLORTERM
62 iproc-env-export LS_COLORS=none
63 iproc-env-unset CLICOLOR
64 iproc-env-export GREP_COLOR=never
65 iproc-env-unset GREP_COLORS
66 iproc-env-export GCC_COLORS=""
67 iproc-env-export SYSTEMD_LOG_COLOR=false
68 endif
69
70 # since proc do not have a pty, fewer
71 # programs produce color, not sure
72 # if all these are needed.
73 ifvar jove-features .*:proc:
74 proc-env-export INSIDE_JOVE=proc
75 proc-env-export LS_COLORS=none
76 proc-env-unset CLICOLOR
77 proc-env-export GREP_COLOR=never
78 proc-env-unset GREP_COLORS
79 proc-env-export GCC_COLORS=""
80 proc-env-export SYSTEMD_LOG_COLOR=false
81
82 # Uncomment to set TERM you find any programs producing
83 # unreadable output in subshells via pipes.
84 # proc-env-export TERM=dumb
85
86 # gcc error messages have Unicode quote chars
87 # if LANG or LC* are set to utf*, which is
88 # typical for modern Linux. That is hard to
89 # read inside Jove compile-it output.
90 # (similarly, nroff produces Unicode hyphens)
91 # LANG=C seems a more readable, albeit constraining
92 # default for Jove subshells (at least,
93 # till Jove gets to understand Unicode)
94 proc-env-export LANG=C
95 endif
96
97 # This makes the arrow keys work on most terminals.
98 bind-to-key previous-line ^[[A
99 bind-to-key next-line ^[[B
100 bind-to-key forward-character ^[[C
101 bind-to-key backward-character ^[[D
102 bind-to-key previous-line ^[OA
103 bind-to-key next-line ^[OB
104 bind-to-key forward-character ^[OC
105 bind-to-key backward-character ^[OD
106
107 # This causes the previous file version to remain as '#filename~'.
108 # set make-backup-files on
109
110 # An alternative modeline with better usage of the space.
111 set mode-line %[Jove%]%w%w%c(%M)%3c[%b:%n]%2c"%f"%c%i# %m*-%2c%p%2s%(%d%e(%t)%)
112
113 # If a terminal needs ^S/^Q for flow control, set allow-^S-and-^Q off
114 # in jove.rc.TERM. Note that many things claiming to be vt100
115 # are now terminal emulators (e.g. NetBSD console), so be careful
116 # turning it off.
117 set allow-^S-and-^Q on
118
119 # source any TERMinal-specific rc file
120 1 source jove.rc.$TERM
121
122
123 # Beginner help window and bindings (adopted from Jove Einsteiger Menue
124 # in Debian package, original by Gerold Meerkoetter)
125 define-macro help-window ^[xselect-buffer *Beginner_Help*^M^[xpushlibd^M^[xinsert-file jem.txt^M^[xmake-buffer-unmodified^M^[xread-only-mode^M^[xwindow-find^Mb^M^[7^[xgrow-window^M^[xpopd^M
126 auto-execute-command delete-other-windows .*/\{teach-jove\|teachjov.txt\}
127 bind-to-key teach-jove ^[t
128 bind-to-key apropos ^Xa
129 ifenv JOVENOHELP 1
130 else
131 ifvar jove-features .*:unix:.*:proc:
132 if sh -c 'test ! -f $HOME/.joverc'
133 execute-macro help-window
134 endif
135 else
136 execute-macro help-window
137 endif
138 endif
139
140 # source local custom rc file, if present
141 # This might be convenient for system admins
142 # making customizations across their entire domain
143 1 source jove-local.rc
144
145 popd
146
147 # source local host rc file, if present
148 # This might be convenient for customizations for a specific
149 # machine.
150 1 source __ETCDIR__/jove.rc
151