Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1_46] remove experimental style code #1562

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/Edit/Editor/edit_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
#include "Pdf/pdf_hummus_extract_attachment.hpp"
#endif

#ifdef EXPERIMENTAL
#include "../../Style/Memorizer/clean_copy.hpp"
#endif

#ifdef USE_PLUGIN_GS
#include "Ghostscript/gs_utilities.hpp"
#endif
Expand Down Expand Up @@ -66,20 +62,13 @@ editor_rep::is_current_editor () {
edit_main_rep::edit_main_rep (server_rep* sv, tm_buffer buf):
editor_rep (sv, buf), props (UNKNOWN), ed_obs (edit_observer (this))
{
#ifdef EXPERIMENTAL
cct= copy (subtree (et, rp));
copy_ip (subtree (et, rp), cct);
#endif
attach_observer (subtree (et, rp), ed_obs);
notify_change (THE_TREE);
tp= correct_cursor (et, rp * 0);
}

edit_main_rep::~edit_main_rep () {
detach_observer (subtree (et, rp), ed_obs);
#ifdef EXPERIMENTAL
mem= memorizer ();
#endif
}

editor
Expand Down
17 changes: 0 additions & 17 deletions src/Edit/Editor/edit_typeset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
#include "observers.hpp"


#ifdef EXPERIMENTAL
#include "../../Style/Environment/std_environment.hpp"
#endif // EXPERIMENTAL

//box empty_box (path ip, int x1=0, int y1=0, int x2=0, int y2=0);
bool enable_fastenv= false;

Expand Down Expand Up @@ -354,19 +350,6 @@ edit_typeset_rep::drd_update () {
drd->heuristic_init (cur[tp]);
}

#ifdef EXPERIMENTAL
void
edit_typeset_rep::environment_update () {
hashmap<string,tree> h;
typeset_prepare ();
env->assign ("base-file-name", as_string (env->base_file_name));
env->assign ("cur-file-name", as_string (env->cur_file_name));
env->assign ("secure", as_tree (env->secure));
env->read_env (h);
::primitive (ste, h);
}
#endif

/******************************************************************************
* Routines for getting information
******************************************************************************/
Expand Down
3 changes: 0 additions & 3 deletions src/Edit/Editor/edit_typeset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ class edit_typeset_rep: virtual public editor_rep {

void init_update ();
void drd_update ();
#ifdef EXPERIMENTAL
void environment_update ();
#endif
tree get_full_env ();
bool defined_at_cursor (string var_name);
bool defined_at_init (string var_name);
Expand Down
16 changes: 0 additions & 16 deletions src/Edit/Interface/edit_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
#include "tree_traverse.hpp"
#include "preferences.hpp"
#include "observers.hpp"
#ifdef EXPERIMENTAL
#include "../../Style/Evaluate/evaluate_main.hpp"
#endif
#include "gui.hpp" // for gui_interrupted

extern void (*env_next_prog)(void);
Expand Down Expand Up @@ -795,19 +792,6 @@ edit_interface_rep::apply_changes () {
the_ghost_cursor()= eb->find_check_cursor (tp);
}

#ifdef EXPERIMENTAL
if (env_change & THE_ENVIRONMENT)
environment_update ();
if (env_change & THE_TREE) {
cout << HRULE;
mem= evaluate (ste, cct);
tree rew= mem->get_tree ();
cout << HRULE;
cout << tree_to_texmacs (rew) << LF;
//print_tree (rew);
}
#endif

// cout << "Handling extents\n";
if (env_change & (THE_TREE+THE_ENVIRONMENT+THE_EXTENTS)) {
string medium= get_init_string (PAGE_MEDIUM);
Expand Down
7 changes: 0 additions & 7 deletions src/Edit/Modify/edit_modify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
#include "observers.hpp"


#ifdef EXPERIMENTAL
#include "../../Style/Memorizer/clean_copy.hpp"
#endif

/******************************************************************************
* Constructors and destructors
******************************************************************************/
Expand Down Expand Up @@ -254,9 +250,6 @@ edit_done (editor_rep* ed, modification mod) {
ASSERT (ed->the_buffer_path() <= p, "invalid modification");
if (mod->k != MOD_SET_CURSOR)
ed->post_notify (p);
#ifdef EXPERIMENTAL
copy_announce (subtree (ed->et, ed->rp), ed->cct, mod / ed->rp);
#endif
}

void
Expand Down
12 changes: 0 additions & 12 deletions src/Edit/editor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
#include "tree_select.hpp"
#include "server.hpp"
#include "drd_info.hpp"
#ifdef EXPERIMENTAL
# include "../Style/Environment/environment.hpp"
# include "../Style/Memorizer/memorizer.hpp"
#endif
#include "new_data.hpp"

#ifdef AQUATEXMACS
Expand Down Expand Up @@ -67,11 +63,6 @@ class editor_rep: public simple_widget_rep {
box eb; // box translation of tree
path rp; // path to the root of the document in et
path tp; // path of cursor in tree
#ifdef EXPERIMENTAL
environment ste; // environment for style rewriting
tree cct; // clean copy of the document tree
memorizer mem; // style converted document tree
#endif

/* exchanging information with the interface */
virtual void get_selection (path& start, path& end) = 0;
Expand Down Expand Up @@ -285,9 +276,6 @@ class editor_rep: public simple_widget_rep {
virtual double divide_lengths (string l1, string l2) = 0;
virtual void init_update () = 0;
virtual void drd_update () = 0;
#ifdef EXPERIMENTAL
virtual void environment_update () = 0;
#endif
virtual tree get_full_env () = 0;
virtual bool defined_at_cursor (string var_name) = 0;
virtual bool defined_at_init (string var_name) = 0;
Expand Down
3 changes: 0 additions & 3 deletions src/Mogan/Code/code.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,6 @@ main (int argc, char** argv) {
bench_start ("initialize texmacs");
init_texmacs ();
bench_cumul ("initialize texmacs");
// #ifdef EXPERIMENTAL
// test_environments ();
// #endif
start_scheme (argc, argv, TeXmacs_main);
#ifdef QTTEXMACS
if (headless_mode) delete qtmcoreapp;
Expand Down
3 changes: 0 additions & 3 deletions src/Mogan/Draw/draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,6 @@ main (int argc, char** argv) {
bench_start ("initialize texmacs");
init_texmacs ();
bench_cumul ("initialize texmacs");
// #ifdef EXPERIMENTAL
// test_environments ();
// #endif
start_scheme (argc, argv, TeXmacs_main);
#ifdef QTTEXMACS
if (headless_mode) delete qtmcoreapp;
Expand Down
3 changes: 0 additions & 3 deletions src/Mogan/Research/research.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,6 @@ main (int argc, char** argv) {
bench_start ("initialize texmacs");
init_texmacs ();
bench_cumul ("initialize texmacs");
// #ifdef EXPERIMENTAL
// test_environments ();
// #endif
start_scheme (argc, argv, TeXmacs_main);
#ifdef QTTEXMACS
if (headless_mode) delete qtmcoreapp;
Expand Down
107 changes: 0 additions & 107 deletions src/Style/Environment/assoc_environment.cpp

This file was deleted.

73 changes: 0 additions & 73 deletions src/Style/Environment/assoc_environment.hpp

This file was deleted.

Loading
Loading