{{{  comments
; add to the text-integer 1, cursor-position is not restored!
; cursor must stand on the end of the positiv-integer.
; if there is no digit under the cursor, add_txt generates 1.
;
; example:
;     ahkjsfghjadf23kajfdkjas
;                  ^
;                  |
;                cursor
;
; will be changed to:
;     ahkjsfghjadf24kajfdkjas
;
}}}
@if-using not(ADD_TXT)
  @use (ADD_TXT)
  {{{  add_txt
  (deffun add_txt (
    case
      {{{  0..8 simple replacement of digit
      (test-char "0 ( "1 ))
      (test-char "1 ( "2 ))
      (test-char "2 ( "3 ))
      (test-char "3 ( "4 ))
      (test-char "4 ( "5 ))
      (test-char "5 ( "6 ))
      (test-char "6 ( "7 ))
      (test-char "7 ( "8 ))
      (test-char "8 ( "9 ))
      }}}
      {{{  9 -> 0 and recursion left of current position
      (test-char "9 (
        if test-begin-line ( "  ) fi
        backward-character
        add_txt
        forward-character "0
      ))
      }}}
      {{{  no digit => insert 1
      (test-char "  ( delete-character "11 backward-character ))
      (test-char ". ( "11 backward-character ))
      default ( forward-character "11 backward-character )
      }}}
    esac
    delete-character
    backward-character
  ))
  }}}
@fi
