<?xml version="1.0"?>
<paste-with-annotations>
  <paste>
    <number>
      <integer>56955</integer>
    </number>
    <user>
      <string>|Agent</string>
    </user>
    <title>
      <string>clumsy method</string>
    </title>
    <contents>
      <string>/// Synopsis: Returns the intermediate elements that make up a quote.
///
/// Discussion: Style changes affect the entire render. Link and monospace
/// affect everything inside typographical quotes. The actual link tag is
/// innermost so its text can be replaced easily by a topic title or an
/// &lt;api-name&gt; or &lt;parameter-name&gt; object (perhaps surrounded by an &lt;xref&gt;).
///
/// From innermost to outermost, the quoted text is wrapped in:
/// link-placeholder, term, code, typographical quotes, bib, b, i, u, term formatting, em
///
define method quote-elements (owner :: &lt;interm-object&gt;, quote :: &lt;quote-token&gt;)
=&gt; (outer-quote-elem :: &lt;interm-object&gt;)
   let specs = check-quote-specifiers(quote);
   let interior =
         if (member?(#&quot;sic&quot;, specs))
            concatenate(quote.open-quote, quote.quoted-content, quote-close-quote)
         else
            quote.quoted-content
         end if;
   let link-target = if (instance?(specs.last, &lt;string&gt;)) specs.last else interior end;
   let last-owned = #f;

   if (member?(#&quot;qv&quot;, specs) | member?(#&quot;toc&quot;, specs))
      let link = make(&lt;link-placeholder&gt;)
      link.text := interior;
      link.target := link-target;
      interior := link;
      last-owned := link;
   end if;
   if (member?(#&quot;term&quot;, specs))
      let term = make(&lt;term&gt;);
      term.text := interior
      interior := term;
      if (last-owned) last-owned.element-owner := term end;
      last-owned := term;
   end if;
   if (member?(#&quot;code&quot;, specs))
      let code = make(&lt;code-phrase&gt;);
      code.text := interior;
      if (last-owned) last-owned.element-owner := code end;
      last-owned := code;
   end if;
   if (member?(#&quot;q&quot;, specs))
      interior := vector(&quot;&#x91;&quot;, interior, &quot;&#x92;&quot;);
   end if;
   if (member?(#&quot;qq&quot;, specs))
      interior := vector(&quot;&#x93;&quot;, interior, &quot;&#x94;&quot;);
   end if;
   if (member?(#&quot;bib&quot;, specs))
      let cite = make(&lt;cite&gt;);
      cite.text := interior;
      interior := cite;
      if (last-owned) last-owned.element-owner := cite end;
      last-owned := cite;
   end if;
   if (member?(#&quot;b&quot;, specs))
      let bold = make(&lt;bold&gt;);
      bold.text := interior;
      interior := bold;
      if (last-owned) last-owned.element-owner := bold end;
      last-owned := bold;
   end if;
   if (member?(#&quot;i&quot;, specs))
      let ital = make(&lt;italic&gt;);
      ital.text := interior;
      interior := ital;
      if (last-owned) last-owned.element-owner := ital end;
      last-owned := ital;
   end if;
   if (member?(#&quot;u&quot;, specs))
      let ul = make(&lt;underline&gt;);
      ul.text := interior;
      interior := ul;
      if (last-owned) last-owned.element-owner := ul end;
      last-owned := ul;
   end if;
   if (member?(#&quot;term&quot;, specs))
      let style = make(&lt;term-style&gt;);
      style.text := interior;
      interior := style;
      if (last-owned) last-owned.element-owner := style end;
      last-owned := style;
   end if;
   if (member?(#&quot;em&quot;, specs))
      let em = make(&lt;emphasis&gt;);
      em.text := interior;
      interior := em;
      if (last-owned) last-owned.element-owner := em end;
      last-owned := em;
   end if;
   if (last-owned) last-owned.element-owner := owner end;
   last-owned
end method;

</string>
    </contents>
    <universal-time>
      <integer>3413864657</integer>
    </universal-time>
    <channel>
      <string>#dylan</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <null/>
    </is-unicode>
  </paste>
  <annotation>
    <number>
      <integer>1</integer>
    </number>
    <user>
      <string>gabor</string>
    </user>
    <title>
      <string>tips for declumsifying</string>
    </title>
    <contents>
      <string>gabor: |Agent: you could use a &quot;select ( ... by predicate) ... end&quot; to get rid of the ugly &quot;if&quot;s
gabor: and &quot;let last-owned = select()&quot; try not to use &quot;:=&quot;</string>
    </contents>
    <universal-time>
      <integer>3413868345</integer>
    </universal-time>
    <channel>
      <string>#dylan</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <null/>
    </is-unicode>
  </annotation>
</paste-with-annotations>