# eev/libeeg/glue - a library for eeg4.
# By edrx, 2001nov28.
# Htmlized version: <http://angg.twu.net/eev/libeeg/glue.html>.
# Define the "glue" function, that glues the two last actions into one.

# (find-es "tcl" "lrange_lreplace")

proc ljoinlast {list n sep} {
  lreplace $list \
           [expr [llength $list]-$n] end \
           [join [lrange $list [expr [llength $list]-$n] end] $sep]
}

proc glue {{n 2}} {
  global actions
  set actions [ljoinlast $actions $n "\n"]
}


#
#  Local Variables:
#  mode:		 tcl
#  coding:               no-conversion
#  ee-anchor-format:     "%s"
#  ee-charset-indicator: ""
#  End:
