newedit/core -> newedit/clicore.

This commit is contained in:
Qi Xiao 2019-04-25 09:25:03 +01:00
parent 5eaec24f11
commit 0e5341b8ce
22 changed files with 26 additions and 26 deletions

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"sync"

View File

@ -1,6 +1,6 @@
// Package core defines the core of Elvish's interactive line editor. It is
// Package clicore defines the core of Elvish's interactive line editor. It is
// language-agnostic and can be used to build editors for other languages.
//
// The center of this package is the Editor type. Most other types are either
// states managed by the Editor or dependencies of the Editor.
package core
package clicore

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"io"

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"errors"

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"fmt"

View File

@ -1,4 +1,4 @@
package core
package clicore
import "os"

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"reflect"

View File

@ -1,4 +1,4 @@
package core
package clicore
import "github.com/elves/elvish/styled"

View File

@ -1,4 +1,4 @@
package core
package clicore
import "sync"

View File

@ -1,4 +1,4 @@
package core
package clicore
import "fmt"

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"reflect"

View File

@ -1,4 +1,4 @@
package core
package clicore
import "github.com/elves/elvish/styled"

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"github.com/elves/elvish/edit/ui"

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"errors"

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"os"

View File

@ -1,6 +1,6 @@
// +build !windows,!plan9
package core
package clicore
import (
"testing"

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"fmt"

View File

@ -1,4 +1,4 @@
package core
package clicore
import (
"github.com/elves/elvish/newedit/editutil"

View File

@ -6,7 +6,7 @@ import "github.com/elves/elvish/newedit/types"
// This file defines the interfaces for those dependencies as well as fake
// implementations that are useful in tests.
// Interface for the core.Editor dependency.
// Interface for the clicore.Editor dependency.
type editor interface {
notifier
State() *types.State

View File

@ -7,7 +7,7 @@ import (
"github.com/elves/elvish/edit/history/histutil"
"github.com/elves/elvish/eval"
"github.com/elves/elvish/eval/vars"
"github.com/elves/elvish/newedit/core"
"github.com/elves/elvish/newedit/clicore"
"github.com/elves/elvish/newedit/highlight"
"github.com/elves/elvish/parse"
"github.com/elves/elvish/store/storedefs"
@ -20,13 +20,13 @@ import (
//
// TODO: Rename ReadLine to ReadCode and remove Close.
type Editor struct {
core *core.Editor
core *clicore.Editor
ns eval.Ns
}
// NewEditor creates a new editor from input and output terminal files.
func NewEditor(in, out *os.File, ev *eval.Evaler, st storedefs.Store) *Editor {
ed := core.NewEditor(core.NewTTY(in, out), core.NewSignalSource())
ed := clicore.NewEditor(clicore.NewTTY(in, out), clicore.NewSignalSource())
ed.Highlighter = highlight.NewHighlighter(
highlight.Dep{Check: makeCheck(ev), HasCommand: makeHasCommand(ev)})

View File

@ -1,4 +1,4 @@
// Package prompt provides an implementation of the core.Prompt interface.
// Package prompt provides an implementation of the clicore.Prompt interface.
package prompt
import (

View File

@ -10,13 +10,13 @@ import (
"github.com/elves/elvish/eval"
"github.com/elves/elvish/eval/vals"
"github.com/elves/elvish/eval/vars"
"github.com/elves/elvish/newedit/core"
"github.com/elves/elvish/newedit/clicore"
"github.com/elves/elvish/newedit/prompt"
"github.com/elves/elvish/styled"
"github.com/elves/elvish/util"
)
func makePrompt(nt notifier, ev *eval.Evaler, ns eval.Ns, computeInit eval.Callable, name string) core.Prompt {
func makePrompt(nt notifier, ev *eval.Evaler, ns eval.Ns, computeInit eval.Callable, name string) clicore.Prompt {
compute := computeInit
ns[name] = vars.FromPtr(&compute)
return prompt.New(func() styled.Text {