Skip to content

Commit

Permalink
NONE -> TRASH rename changes
Browse files Browse the repository at this point in the history
The actual way to handle this renaming is generally just not to
mention the name of the ~ isotope, but refer to it as ~.

While the technical name is now "trash", that doesn't need to come up
necessarily all that often.
  • Loading branch information
hostilefork committed Dec 13, 2023
1 parent a478a86 commit 7fbdc83
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 27 deletions.
5 changes: 2 additions & 3 deletions eparse.reb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ed-clear-underlines: js-awaiter [ ; repeat of code exported by %main.reb
}

ensure-underline-extension-loaded: func [
return: <none>
return: [~]
<static> loaded (false)
][
if not loaded [
Expand All @@ -47,7 +47,6 @@ ed-add-underline: js-native [
reb.UnboxInteger(reb.ArgR("from")),
reb.UnboxInteger(reb.ArgR("to"))
)
return reb.None()
}

ed-select: js-native [
Expand Down Expand Up @@ -129,7 +128,7 @@ pdebug-loaded: false
ensure-debug-panel-loaded: func [
{Create GoldenLayout panel with a toolbar and div for stack display}
] [
if pdebug-loaded [return none]
if pdebug-loaded [return ~]

css-do {
.pd-panel { /* https://discuss.codemirror.net/t/2882 */
Expand Down
2 changes: 1 addition & 1 deletion event-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function stringify_object(object, depth=0, max_depth=2) {
return reb.Text(JSON.stringify(window.keylog.shift()))
}
export keylog: func [return: <none>] [
export keylog: func [return: [~]] [
let key
while [key: try-get-one-keylog] [
print mold key
Expand Down
6 changes: 3 additions & 3 deletions js-css-interop.reb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ js-do-url-helper: js-awaiter [ ; https://stackoverflow.com/a/14521482
js-do: func [
{Execute JavaScript file or evaluate a string of JavaScript source}

return: <none> ; What useful return result could there be?
return: [~] ; What useful return result could there be?
source "If BLOCK!, interpreted in JS-DO dialect (substitutes @-values)"
[<maybe> block! text! file! url! tag!]
/automime "Subvert incorrect server MIME-type by requesting via fetch()"
Expand Down Expand Up @@ -190,7 +190,7 @@ js-do: func [
js-eval: func [
{Evaluate JavaScript expression in local environment and return result}

return: [<opt> <none> logic? integer! text!]
return: [~ <opt> logic? integer! text!]
expression "If BLOCK!, interpreted in JS-DO dialect (substitutes @-values)"
[<maybe> block! text!]
][
Expand Down Expand Up @@ -266,7 +266,7 @@ css-do-url-helper: js-native [ ; https://stackoverflow.com/a/577002
css-do: func [
{Incorporate a CSS file or a snippet of CSS source into the page}

return: <none> ; Could return an auto-generated ID for later removing (?)
return: [~] ; Could return an auto-generated ID for later removing (?)
; 'id [<skip> issue!] ; Idea: what if you could `css-do #id {...}`
source "TAG! interpreted as relative to currently running script"
[text! file! url! tag!]
Expand Down
10 changes: 5 additions & 5 deletions main.reb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export main: adapt :console [
[greeting: greeting-text]
])

print-halted: meth [return: <none>] [
print-halted: meth [return: [~]] [
print "[interrupted by Escape key or HALT instruction]"
]
]
Expand Down Expand Up @@ -235,7 +235,7 @@ export watch: func [:arg] [

=== COMMAND FOR INVOKING REDBOL (Rebol2/Red Emulation) ===

export redbol: func [return: <none>] [
export redbol: func [return: [~]] [
print delimit LF [
""
"Ren-C has many changes (e.g. replacing TYPE? with TYPE OF, where"
Expand Down Expand Up @@ -271,10 +271,10 @@ export redbol: func [return: <none>] [
=== GOLDEN LAYOUTS DEMO ===

export ensure-golden-layouts-loaded: func [
return: <none>
return: [~]
<static> loaded (false)
][
if loaded [return none]
if loaded [return ~]

css-do join replpad-dir %libs/golden/css/goldenlayout-base.css
css-do join replpad-dir %libs/golden/css/themes/goldenlayout-replpad-theme.css
Expand All @@ -299,7 +299,7 @@ export ensure-golden-layouts-loaded: func [
=== CODEMIRROR 6 EDITOR DEMO ===

export edit: func [
return: <none>
return: [~]
source [url! text! file!]
/marks
<static> codemirror-loaded (false)
Expand Down
20 changes: 10 additions & 10 deletions replpad.reb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ use [
title: "Console.log Scheme"
name: 'log

init: func [return: <none> port][
init: func [return: [~] port][
[@ port.spec.path]: find/match as text! port.spec.ref log::
assert [find ["info" "log" "warn" "error"] port.spec.path]
]
Expand Down Expand Up @@ -199,19 +199,19 @@ cls: clear-screen: js-awaiter [
replpad-write-js: js-awaiter [
{Output lines of text to the REPLPAD (no automatic newline after)}

return: <none>
return: [~]
param [<maybe> text!]
/html
]{
let param = reb.Spell(reb.ArgR('param'))
if (param == "")
return reb.None() // no-op if content is empty
return reb.Trash() // no-op if content is empty
let html = reb.Did(reb.ArgR('html'))
if (html) {
replpad.insertAdjacentHTML('beforeend', param)
return reb.None()
return reb.Trash()
}
let span = EnsureLastLineSpan('stdout') // write to a stdout span
Expand All @@ -238,7 +238,7 @@ replpad-write-js: js-awaiter [
}
span.innerHTML += pieces.shift()
return reb.None()
return reb.Trash()
}

; There are several issues with escaping to be considered in trying to write
Expand All @@ -262,13 +262,13 @@ replpad-write-js: js-awaiter [
replpad-write: func [
{Output a string of text to the REPLPAD (no automatic newline after)}

return: <none>
return: [~]
param [<maybe> text!]
/html
][
if html [
replpad-write-js/html param
return none
return ~
]

; Since we aren't using <pre> or a <textarea>, this initially had some
Expand Down Expand Up @@ -496,7 +496,7 @@ sys.util.make-scheme [
title: "File Access"
name: 'file

init: func [return: <none> port [port!]] [
init: func [return: [~] port [port!]] [
case [
not all [
in port.spec 'ref
Expand Down Expand Up @@ -827,7 +827,7 @@ sys.util.make-scheme [
title: "Downloads Scheme"
name: 'downloads

init: func [return: <none> port] [
init: func [return: [~] port] [
assert [match text! port.spec.path]
port.spec.path: split-path port.spec.path
]
Expand Down Expand Up @@ -926,7 +926,7 @@ now: js-native [

lib.browse: func [
{Provide a clickable link to the user to open in the browser}
return: <none>
return: [~]
url [url!]
][
comment {
Expand Down
6 changes: 3 additions & 3 deletions storage.reb
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ if storage-enabled? [ ; Browser reported that it is storage-capable
title: "Browser Storage API"
name: 'storage

init: func [return: <none> port [port!]] [
init: func [return: [~] port [port!]] [
if not all [
in port.spec 'ref
url? port.spec.ref
Expand Down Expand Up @@ -280,7 +280,7 @@ if storage-enabled? [ ; Browser reported that it is storage-capable
title: "File Access"
name: 'file

init: func [return: <none> port [port!]] [
init: func [return: [~] port [port!]] [
case [
not all [
in port.spec 'ref
Expand Down Expand Up @@ -402,7 +402,7 @@ if storage-enabled? [ ; Browser reported that it is storage-capable
title: "File Directory Access"
name: 'dir

init: func [return: <none> port [port!]] [
init: func [return: [~] port [port!]] [
case [
not all [
in port.spec 'ref
Expand Down
4 changes: 2 additions & 2 deletions watchlist/main.reb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ js-do %watchlist.js
watches: []

delete-watch: function [
return: <none>
return: [~]
n [integer!]
][
if n > length of watches [
Expand Down Expand Up @@ -194,5 +194,5 @@ system.console.print-result: enclose :system.console.print-result func [f] [
if "none" <> js-eval {document.getElementById('right').style.display} [
update-watches
]
return none
return ~
]

0 comments on commit 7fbdc83

Please sign in to comment.