跳转到内容

Rebol 编程/编辑器

来自维基教科书,开放的书籍,开放的世界
EDITOR file /app app-word 

(未记录)

EDITOR 是一个函数值。

  • 文件 -- (类型:任何)
  • /app
    • app-word -- (类型:任何)

源代码

[编辑 | 编辑源代码]
editor: func [file /app app-word /local tmp][
    either link? [
        if block? ctx-edit [
            ctx-edit: context either all [
                value? 'fileset-files? 
                tmp: fileset-files? 'desktop 
                find tmp %desktop/edit.r 
                tmp: load/header link-root/desktop/edit.r
            ] [next tmp] [ctx-edit]
        ] 
        either app [ctx-edit/view-file/app file app-word] [ctx-edit/view-file file]
    ] [
        either exists? tmp: view-root/desktop/scripts/edit.r [do/args tmp file] [
            if block? ctx-edit [ctx-edit: context ctx-edit] 
            ctx-edit/view-file file
        ]
    ]
]
华夏公益教科书