<?xml version="1.0" encoding="windows-1252"?>
<node id="297364" title="Re: Goofy leaping ninja stickmen" created="2003-10-07 15:09:55" updated="2005-08-13 07:36:32">
<type id="11">
note</type>
<author id="230012">
jonadab</author>
<data>
<field name="doctext">
&lt;p&gt;You could either change the wrap width in your prefs,
   or use the &lt;a href="http://www.perlmonks.org/index.pl?node_id=297319&amp;displaytype=displaycode"&gt;download the code&lt;/a&gt; link as
   [bart] suggests.  Or you could use an editor macro or
   function to undo the plus-wrapping.  In Emacs, this
   should do it...
&lt;/p&gt;

&lt;code&gt;
(defun unplusify-buffer () (interactive)
  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward "^[+]")
      (backward-delete-char 2))))
&lt;/code&gt;

&lt;p&gt;The corresponding unplusify-region function is left
   as an exercise for the reader.  Also note that I didn't
   worry about lines that legitimately start with +,
   because my obfu doesn't have any.  A more general
   case would be a couple extra lines, as it would have 
   to check whether the previous line is the same length
   as your wrap width.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;update:&lt;/strong&gt; like this:&lt;/p&gt;
&lt;code&gt;
(defvar perlmonks-wrap-width 60)

(defun perlmonks-unplusify-buffer () (interactive)
  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward "^[+]" (point-max) nil)
      (if (= perlmonks-wrap-width
             (save-excursion (previous-line 1) (end-of-line) (current-column)))
          (backward-delete-char 2)))))
&lt;/code&gt;

&lt;div class="pmsig"&gt;&lt;div class="pmsig-230012"&gt;
&lt;hr&gt;&lt;/hr&gt;
&lt;code&gt;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b-&gt;()}}
split//,".rekcah lreP rehtona tsuJ";$\=$ ;-&gt;();print$/&lt;/code&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
297319</field>
<field name="parent_node">
297333</field>
</data>
</node>
