editors: better error message when editing 'f', use vocab-tests-path in edit-tests.

db4
John Benediktsson 2012-07-23 10:02:00 -07:00
parent 3a5d7077fb
commit b4f4e6f6ca
1 changed files with 4 additions and 1 deletions

View File

@ -36,7 +36,10 @@ M: object editor-detached? t ;
dup status>> { 0 f } member?
[ drop ] [ process-failed ] if ;
ERROR: invalid-location file line ;
: edit-location ( file line -- )
over [ invalid-location ] unless
[ absolute-path ] dip
editor-command [ run-and-wait-for-editor ] when* ;
@ -97,7 +100,7 @@ M: word edit-docs
GENERIC: edit-tests ( object -- )
M: object edit-tests vocab-tests-file 1 edit-location ;
M: object edit-tests vocab-tests-path 1 edit-location ;
M: word edit-tests vocabulary>> edit-tests ;