Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii committed Dec 10, 2023
1 parent 9bc999f commit 3495cb0
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion TeXmacs/progs/source/shortcut-widgets.scm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
(tm-define (open-shortcuts-editor . opt)
(:interactive #t)
(let* ((b (current-buffer))
(u (string->url (string-append "tmfs://aux/edit-shortcuts")))
(u (string-append "tmfs://aux/edit-shortcuts"))
(sh (if (null? opt) "" (car opt)))
(cmd (if (or (null? opt) (null? (cdr opt))) "" (cadr opt))))
(dialogue-window (shortcuts-editor u sh cmd)
Expand Down
4 changes: 2 additions & 2 deletions src/Scheme/L3/glue_url.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function main()
},
{
scm_name = "string->url",
cpp_name = "tm_url",
cpp_name = "url",
ret_type = "url",
arg_list = {
"string"
Expand All @@ -125,7 +125,7 @@ function main()
},
{
scm_name = "unix->url",
cpp_name = "tm_url",
cpp_name = "url",
ret_type = "url",
arg_list = {
"string"
Expand Down
5 changes: 0 additions & 5 deletions src/System/Classes/tm_url.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@
#include "analyze.hpp"
#include "scheme.hpp"

url tm_url (string name) {
if (starts (name, "tmfs://")) return tmfs_url (name (7, N (name)));
else return url_general (name, URL_UNIX);
}

bool url_test (url name, string filter) {
if (filter == "") return true;
int i, n= N(filter);
Expand Down
1 change: 0 additions & 1 deletion src/System/Classes/tm_url.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "tree.hpp"
#include "tm_debug.hpp"

url tm_url (string name);
bool is_secure (url u); // is u secure?

/******************************************************************************
Expand Down
6 changes: 0 additions & 6 deletions src/System/Classes/tmfs_url.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@

#include "tmfs_url.hpp"

tmfs_url::tmfs_url (string name)
: url (url_root ("tmfs") * url_get_name (name)) {}

tmfs_url::tmfs_url (const char* name)
: url (url_root ("tmfs") * url_get_name (string (name))) {}

bool
is_tmfs_protocol (url u, string protocol) {
return u->t == protocol ||
Expand Down
2 changes: 1 addition & 1 deletion src/Texmacs/Data/new_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ latex_expand (tree doc, url name) {

tree
latex_expand (tree doc) {
tm_view vw= concrete_view (tm_url (as_string (extract (doc, "view"))));
tm_view vw= concrete_view (url_system (as_string (extract (doc, "view"))));
tree body= vw->ed->exec_latex (extract (doc, "body"));
doc= change_doc_attr (doc, "body", body);
return remove_doc_attr (doc, "view");
Expand Down
2 changes: 1 addition & 1 deletion src/Texmacs/Data/new_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ abstract_view (tm_view vw) {
string name= encode_url (vw->buf->buf->name);
//cout << vw->buf->buf->name << " -> " << name << "\n";
string nr = as_string (vw->nr);
return tm_url ("tmfs://view/" * nr * "/" * name);
return url_system ("tmfs://view/" * nr * "/" * name);
}

tm_view
Expand Down
2 changes: 1 addition & 1 deletion src/Texmacs/Window/tm_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ embedded_name (url name) {
static int nr= 0;
if (!is_none (name)) return name;
nr++;
return tm_url (string ("tmfs://aux/TeXmacs-input-" * as_string (nr)));
return url_system (string ("tmfs://aux/TeXmacs-input-" * as_string (nr)));
}

tree
Expand Down

0 comments on commit 3495cb0

Please sign in to comment.