emacs-devel
[Top][All Lists]
Advanced

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

ewoc patch


From: Tom Breton (Tehom)
Subject: ewoc patch
Date: Tue, 8 Dec 2009 23:03:12 -0500
User-agent: SquirrelMail/1.4.19

I like the ewoc package, but I found it somewhat inflexible.  I am
submitting this diff (attached) in the hope of improving it.

In particular:

 * ewoc always wants every entry to be separated from the other
   entries by a newline.

 * It does not work properly with blank entries.  These become a real
   problem when a blank separator is allowed.  Nodes often get printed
   out of order.

 * ewoc-map is slightly misnamed; it doesn't map, it's more like
   for-each.

Summary of changes:

 * Added a version number.  I didn't have much to go on, so I just
   said it was "2.0".  I will gladly change it to correspond to an
   official version number.

 * ewoc-create takes an optional fourth argument, "separator"

 * Added a new field to the ewoc, "separator".  That's the string that
   separates entries.  It defaults to "\n".

 * Added functions

   * ewoc--raw-location

   * ewoc--next-printed-node

   * ewoc--next-start-marker

   * ewoc-location-safe

   * ewoc--print-node

   * ewoc--print-anew

   * ewoc--delete-node-text

   * ewoc--mark-node-empty

 * Added alias: ewoc-foreach for ewoc-map

 * Removed ewoc--create-node.

 * Rearranged some functionality:

   * All printing goes thru new function ewoc--print-node

   * All unprinting uses new function ewoc--mark-node-empty.

 * Design: Nodes that have no text have no start marker.

 * Design: ewoc now handles the different printing of header/footer vs
   other nodes by passing a printer function to `ewoc--print-node'.

Testing:

 * Created a test suite.  The suite relies on rtest, which
   unfortunately is still between releasable versions.

 * Thru application "colorcomp" (written by TTN, thank you)

        Tom Breton (Tehom)

Attachment: ewoc.el.3.diff
Description: Binary data


reply via email to

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