[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] In function "edit_dynamic_rep::make_hybrid": why "if (sele

From: Norbert Nemec
Subject: [Texmacs-dev] In function "edit_dynamic_rep::make_hybrid": why "if (selection_active_small ())"?
Date: Thu, 03 Nov 2005 16:31:23 +0100
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)

I often wonder about the behavior of the "\" key that seems to have
changed over the past few versions.

In TeXmacs-, I read:

edit_dynamic_rep::make_hybrid () {
  tree t (HYBRID, "");
  if (selection_active_small ())
    t[0]= selection_get_cut ();
  if (is_func (t, HYBRID, 1) && (t[0] != "") &&
      (!(is_atomic (t[0]) && drd->contains (t[0]->label))))
    t= tree (HYBRID, "", t[0]);
  path p= end (t, path (0));
  if (in_source ()) insert_tree (t, p);
  else insert_tree (tree (INACTIVE, t), path (0, p));
  set_message ("return: activate symbol or macro", "hybrid");

The first if-query seems to suggest, that it is intended that small
selections are included inside the hybrid while larger selections are
ignored. Effectively that means, that I can easily add markup to single
lines, but not to multiple lines, even though many markup tags (e.g.
<bf|...>) work very well even for multiple paragraphs.

Is the "if (selection_active_small ())" necessary by principle or could
it be relaxed?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]