# File lib/rbreadline.rb, line 7662
  def rl_undo_command(count, key)
    if (count < 0)
      return 0 # Nothing to do.
    end
    while (count>0)
      if (rl_do_undo())
        count-=1
      else
        rl_ding()
        break
      end
    end
    0
  end