{{{  comments
; these macros replace the originial origami-functions kill-line,
; copy-to-kill-buffer and insert-folded-kill-buffer. They work in the
; same way but display a '+' in the statusline, if kill-buffer isn't empty.
; The variable killed-line contains the number of picked lines.
;
; you can use the following symbols to control the compilation:
; MY-KILL-MODESTRING - You have to define the user-mode KB to show a non-empty
;                      kill-buffer yourself!
; NO-KILL-MODESTRING - Don't mark a non-empty kill-buffer in statusline
;                      The usermode KB isn't defined.
}}}
@if-using not(KILL-MARK)
   @use (KILL-MARK)
   @if-using not(NO-KILL-MODESTRING MY-KILL-MODESTRING)
      ( defmodestring KB   "+    "+ )
   @fi
   ( defvar ( killed-line ) )     ; lines in kill-buffer
   {{{  kill-line-
   ( deffun kill-line-
      ( if or(test-text test-fold-line test-filed)
         ( kill-line
           set-counter killed-line +(killed-line 1)
           @if-using not(NO-KILL-MODESTRING)
              set-user-mode KB
           @fi
         )
        fi
      )
   )
   }}}
   {{{  copy-to-kill-buffer-
   ( deffun copy-to-kill-buffer-
      ( if or(test-text test-fold-line)
         ( if last-message M_NO_FF_COPY () fi
           copy-to-kill-buffer
           if not(last-message M_NO_FF_COPY)
            ( set-counter killed-line +(killed-line 1)
              @if-using not(NO-KILL-MODESTRING)
                 set-user-mode KB
              @fi
            )
           fi
         )
        fi
      )
   )
   }}}
   {{{  insert-folded-kill-buffer-
   ( deffun insert-folded-kill-buffer-
      ( if and(not(test-top) counter>0 killed-line)
         ( insert-folded-kill-buffer
           set-counter killed-line 0
           @if-using not(NO-KILL-MODESTRING)
              reset-user-mode KB
           @fi
         )
        fi
      )
   )
   }}}
@fi
