-
Notifications
You must be signed in to change notification settings - Fork 0
/
loaderrs.rc
40 lines (39 loc) · 1.21 KB
/
loaderrs.rc
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
; $Header: /usr/build/vile/vile/macros/RCS/loaderrs.rc,v 1.2 2007/08/07 00:32:16 tom Exp $
; A macro that prepends user's error-patterns to [Error Expressions]. The
; user-defined patterns are in a file ".vile-errs" or "vile-errs". The macro
; binds ^X^X to LoadErrorExprs temporarily, then the first time it is run,
; ^X^X, it builds the combined list of patterns and resets the binding to the
; normal one.
store-procedure LoadErrorExprs
~local $buffer-hook
unsetv $buffer-hook
~local %file
setv %file=&pquote &lookup r+home+startup '.vile-errs'
~if &seq %file ''
setv %file=&pquote &lookup r+startup 'vile-errs'
~endif
~if ¬ &seq %file ''
~local %oldbuffer %imply
setv %oldbuffer=$cbufname
setv %imply=$implybuffer
set noimplybuffer
; make sure it exists
compile-error-expressions
; kill the current contents
kill-buffer '[Error Expressions]'
; create it, so we can modify it
compile-error-expressions
edit-file '[Error Expressions]'
unsetl view
goto-beginning-of-file
0 insert-file %file
unmark
setl view
buffer %oldbuffer
compile-error-expressions
setv $implybuffer=%imply
bind-key find-next-error ^X-^X
~hidden find-next-error
~endif
~endm
bind-key LoadErrorExprs ^X-^X