Karsten Hopp 6a8140
To: vim_dev@googlegroups.com
Karsten Hopp 6a8140
Subject: Patch 7.3.1234
Karsten Hopp 6a8140
Fcc: outbox
Karsten Hopp 6a8140
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 6a8140
Mime-Version: 1.0
Karsten Hopp 6a8140
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 6a8140
Content-Transfer-Encoding: 8bit
Karsten Hopp 6a8140
------------
Karsten Hopp 6a8140
Karsten Hopp 6a8140
Patch 7.3.1234 (after 7.3.1229)
Karsten Hopp 6a8140
Problem:    Python: Strings are not marked for translation.
Karsten Hopp 6a8140
Solution:   Add N_() where appropriate. (ZyX)
Karsten Hopp 6a8140
Files:	    src/if_py_both.h
Karsten Hopp 6a8140
Karsten Hopp 6a8140
Karsten Hopp 6a8140
*** ../vim-7.3.1233/src/if_py_both.h	2013-06-23 14:37:00.000000000 +0200
Karsten Hopp 6a8140
--- src/if_py_both.h	2013-06-23 16:00:03.000000000 +0200
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 37,52 ****
Karsten Hopp 6a8140
  	: obj->ob_type->tp_name)
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
  #define RAISE_NO_EMPTY_KEYS PyErr_SET_STRING(PyExc_ValueError, \
Karsten Hopp 6a8140
! 						"empty keys are not allowed")
Karsten Hopp 6a8140
! #define RAISE_LOCKED(type) PyErr_SET_VIM(_(type " is locked"))
Karsten Hopp 6a8140
! #define RAISE_LOCKED_DICTIONARY RAISE_LOCKED("dictionary")
Karsten Hopp 6a8140
! #define RAISE_LOCKED_LIST RAISE_LOCKED("list")
Karsten Hopp 6a8140
! #define RAISE_UNDO_FAIL PyErr_SET_VIM("cannot save undo information")
Karsten Hopp 6a8140
! #define RAISE_LINE_FAIL(act) PyErr_SET_VIM("cannot " act " line")
Karsten Hopp 6a8140
  #define RAISE_KEY_ADD_FAIL(key) \
Karsten Hopp 6a8140
!     PyErr_VIM_FORMAT("failed to add key '%s' to dictionary", key)
Karsten Hopp 6a8140
  #define RAISE_INVALID_INDEX_TYPE(idx) \
Karsten Hopp 6a8140
!     PyErr_FORMAT(PyExc_TypeError, "index must be int or slice, not %s", \
Karsten Hopp 6a8140
  	    Py_TYPE_NAME(idx));
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
  #define INVALID_BUFFER_VALUE ((buf_T *)(-1))
Karsten Hopp 6a8140
--- 37,53 ----
Karsten Hopp 6a8140
  	: obj->ob_type->tp_name)
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
  #define RAISE_NO_EMPTY_KEYS PyErr_SET_STRING(PyExc_ValueError, \
Karsten Hopp 6a8140
! 					    N_("empty keys are not allowed"))
Karsten Hopp 6a8140
! #define RAISE_LOCKED_DICTIONARY PyErr_SET_VIM(N_("dictionary is locked"))
Karsten Hopp 6a8140
! #define RAISE_LOCKED_LIST PyErr_SET_VIM(N_("list is locked"))
Karsten Hopp 6a8140
! #define RAISE_UNDO_FAIL PyErr_SET_VIM(N_("cannot save undo information"))
Karsten Hopp 6a8140
! #define RAISE_DELETE_LINE_FAIL PyErr_SET_VIM(N_("cannot delete line"))
Karsten Hopp 6a8140
! #define RAISE_INSERT_LINE_FAIL PyErr_SET_VIM(N_("cannot insert line"))
Karsten Hopp 6a8140
! #define RAISE_REPLACE_LINE_FAIL PyErr_SET_VIM(N_("cannot replace line"))
Karsten Hopp 6a8140
  #define RAISE_KEY_ADD_FAIL(key) \
Karsten Hopp 6a8140
!     PyErr_VIM_FORMAT(N_("failed to add key '%s' to dictionary"), key)
Karsten Hopp 6a8140
  #define RAISE_INVALID_INDEX_TYPE(idx) \
Karsten Hopp 6a8140
!     PyErr_FORMAT(PyExc_TypeError, N_("index must be int or slice, not %s"), \
Karsten Hopp 6a8140
  	    Py_TYPE_NAME(idx));
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
  #define INVALID_BUFFER_VALUE ((buf_T *)(-1))
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 140,148 ****
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
  #if PY_MAJOR_VERSION < 3
Karsten Hopp 6a8140
! 		"expected str() or unicode() instance, but got %s"
Karsten Hopp 6a8140
  #else
Karsten Hopp 6a8140
! 		"expected bytes() or str() instance, but got %s"
Karsten Hopp 6a8140
  #endif
Karsten Hopp 6a8140
  		, Py_TYPE_NAME(obj));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
--- 141,149 ----
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
  #if PY_MAJOR_VERSION < 3
Karsten Hopp 6a8140
! 		N_("expected str() or unicode() instance, but got %s")
Karsten Hopp 6a8140
  #else
Karsten Hopp 6a8140
! 		N_("expected bytes() or str() instance, but got %s")
Karsten Hopp 6a8140
  #endif
Karsten Hopp 6a8140
  		, Py_TYPE_NAME(obj));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 192,202 ****
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
  #if PY_MAJOR_VERSION < 3
Karsten Hopp 6a8140
! 		"expected int(), long() or something supporting "
Karsten Hopp 6a8140
! 		"coercing to long(), but got %s"
Karsten Hopp 6a8140
  #else
Karsten Hopp 6a8140
! 		"expected int() or something supporting coercing to int(), "
Karsten Hopp 6a8140
! 		"but got %s"
Karsten Hopp 6a8140
  #endif
Karsten Hopp 6a8140
  		, Py_TYPE_NAME(obj));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
--- 193,203 ----
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
  #if PY_MAJOR_VERSION < 3
Karsten Hopp 6a8140
! 		N_("expected int(), long() or something supporting "
Karsten Hopp 6a8140
! 		   "coercing to long(), but got %s")
Karsten Hopp 6a8140
  #else
Karsten Hopp 6a8140
! 		N_("expected int() or something supporting coercing to int(), "
Karsten Hopp 6a8140
! 		   "but got %s")
Karsten Hopp 6a8140
  #endif
Karsten Hopp 6a8140
  		, Py_TYPE_NAME(obj));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 207,219 ****
Karsten Hopp 6a8140
  	if (*result > INT_MAX)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_OverflowError,
Karsten Hopp 6a8140
! 		    "value is too large to fit into C int type");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else if (*result < INT_MIN)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_OverflowError,
Karsten Hopp 6a8140
! 		    "value is too small to fit into C int type");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
--- 208,220 ----
Karsten Hopp 6a8140
  	if (*result > INT_MAX)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_OverflowError,
Karsten Hopp 6a8140
! 		    N_("value is too large to fit into C int type"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else if (*result < INT_MIN)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_OverflowError,
Karsten Hopp 6a8140
! 		    N_("value is too small to fit into C int type"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 223,229 ****
Karsten Hopp 6a8140
  	if (*result <= 0)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    "number must be greater then zero");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
--- 224,230 ----
Karsten Hopp 6a8140
  	if (*result <= 0)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    N_("number must be greater then zero"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 232,238 ****
Karsten Hopp 6a8140
  	if (*result < 0)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    "number must be greater or equal to zero");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
--- 233,239 ----
Karsten Hopp 6a8140
  	if (*result < 0)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    N_("number must be greater or equal to zero"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 326,332 ****
Karsten Hopp 6a8140
      if (valObject == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_AttributeError,
Karsten Hopp 6a8140
! 		"can't delete OutputObject attributes");
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 327,333 ----
Karsten Hopp 6a8140
      if (valObject == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_AttributeError,
Karsten Hopp 6a8140
! 		N_("can't delete OutputObject attributes"));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 337,343 ****
Karsten Hopp 6a8140
  	return 0;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
!     PyErr_FORMAT(PyExc_AttributeError, "invalid attribute: %s", name);
Karsten Hopp 6a8140
      return -1;
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 338,344 ----
Karsten Hopp 6a8140
  	return 0;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
!     PyErr_FORMAT(PyExc_AttributeError, N_("invalid attribute: %s"), name);
Karsten Hopp 6a8140
      return -1;
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 785,791 ****
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (our_tv == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM("invalid expression");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 786,792 ----
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (our_tv == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM(N_("invalid expression"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 836,842 ****
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (our_tv == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM("invalid expression");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 837,843 ----
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (our_tv == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM(N_("invalid expression"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 908,914 ****
Karsten Hopp 6a8140
  	if (VimTryEnd())
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
! 	PyErr_SET_VIM("failed to change directory");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 909,915 ----
Karsten Hopp 6a8140
  	if (VimTryEnd())
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
! 	PyErr_SET_VIM(N_("failed to change directory"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 1086,1100 ****
Karsten Hopp 6a8140
      if (!PyTuple_Check(find_module_result))
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		"expected 3-tuple as imp.find_module() result, but got %s",
Karsten Hopp 6a8140
  		Py_TYPE_NAME(find_module_result));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      if (PyTuple_GET_SIZE(find_module_result) != 3)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		"expected 3-tuple as imp.find_module() result, but got "
Karsten Hopp 6a8140
! 		"tuple of size %d",
Karsten Hopp 6a8140
  		(int) PyTuple_GET_SIZE(find_module_result));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
--- 1087,1101 ----
Karsten Hopp 6a8140
      if (!PyTuple_Check(find_module_result))
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		N_("expected 3-tuple as imp.find_module() result, but got %s"),
Karsten Hopp 6a8140
  		Py_TYPE_NAME(find_module_result));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      if (PyTuple_GET_SIZE(find_module_result) != 3)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		N_("expected 3-tuple as imp.find_module() result, but got "
Karsten Hopp 6a8140
! 		   "tuple of size %d"),
Karsten Hopp 6a8140
  		(int) PyTuple_GET_SIZE(find_module_result));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 1104,1110 ****
Karsten Hopp 6a8140
  	    || !(description = PyTuple_GET_ITEM(find_module_result, 2)))
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_RuntimeError,
Karsten Hopp 6a8140
! 		"internal error: imp.find_module returned tuple with NULL");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 1105,1111 ----
Karsten Hopp 6a8140
  	    || !(description = PyTuple_GET_ITEM(find_module_result, 2)))
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_RuntimeError,
Karsten Hopp 6a8140
! 		N_("internal error: imp.find_module returned tuple with NULL"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 1476,1482 ****
Karsten Hopp 6a8140
      if (valObject == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_AttributeError,
Karsten Hopp 6a8140
! 		"cannot delete vim.Dictionary attributes");
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 1477,1483 ----
Karsten Hopp 6a8140
      if (valObject == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_AttributeError,
Karsten Hopp 6a8140
! 		N_("cannot delete vim.Dictionary attributes"));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 1484,1490 ****
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	if (self->dict->dv_lock == VAR_FIXED)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_SET_STRING(PyExc_TypeError, "cannot modify fixed dictionary");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
--- 1485,1492 ----
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	if (self->dict->dv_lock == VAR_FIXED)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_SET_STRING(PyExc_TypeError,
Karsten Hopp 6a8140
! 		    N_("cannot modify fixed dictionary"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 1501,1507 ****
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_FORMAT(PyExc_AttributeError, "cannot set attribute %s", name);
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
--- 1503,1509 ----
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_FORMAT(PyExc_AttributeError, N_("cannot set attribute %s"), name);
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 1635,1641 ****
Karsten Hopp 6a8140
  	    (*dii)->ht->ht_used != (*dii)->ht_used)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_RuntimeError,
Karsten Hopp 6a8140
! 		"hashtab changed during iteration");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 1637,1643 ----
Karsten Hopp 6a8140
  	    (*dii)->ht->ht_used != (*dii)->ht_used)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_RuntimeError,
Karsten Hopp 6a8140
! 		N_("hashtab changed during iteration"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 1906,1913 ****
Karsten Hopp 6a8140
  		    Py_DECREF(iterator);
Karsten Hopp 6a8140
  		    Py_DECREF(fast);
Karsten Hopp 6a8140
  		    PyErr_FORMAT(PyExc_ValueError,
Karsten Hopp 6a8140
! 			    "expected sequence element of size 2, "
Karsten Hopp 6a8140
! 			    "but got sequence of size %d",
Karsten Hopp 6a8140
  			    PySequence_Fast_GET_SIZE(fast));
Karsten Hopp 6a8140
  		    return NULL;
Karsten Hopp 6a8140
  		}
Karsten Hopp 6a8140
--- 1908,1915 ----
Karsten Hopp 6a8140
  		    Py_DECREF(iterator);
Karsten Hopp 6a8140
  		    Py_DECREF(fast);
Karsten Hopp 6a8140
  		    PyErr_FORMAT(PyExc_ValueError,
Karsten Hopp 6a8140
! 			    N_("expected sequence element of size 2, "
Karsten Hopp 6a8140
! 			    "but got sequence of size %d"),
Karsten Hopp 6a8140
  			    PySequence_Fast_GET_SIZE(fast));
Karsten Hopp 6a8140
  		    return NULL;
Karsten Hopp 6a8140
  		}
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2150,2156 ****
Karsten Hopp 6a8140
      if (kwargs)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_TypeError,
Karsten Hopp 6a8140
! 		"list constructor does not accept keyword arguments");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 2152,2158 ----
Karsten Hopp 6a8140
      if (kwargs)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_TypeError,
Karsten Hopp 6a8140
! 		N_("list constructor does not accept keyword arguments"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2205,2218 ****
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (index >= ListLength(self))
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_IndexError, "list index out of range");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      li = list_find(self->list, (long) index);
Karsten Hopp 6a8140
      if (li == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	/* No more suitable format specifications in python-2.3 */
Karsten Hopp 6a8140
! 	PyErr_VIM_FORMAT("internal error: failed to get vim list item %d",
Karsten Hopp 6a8140
  		(int) index);
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
--- 2207,2220 ----
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (index >= ListLength(self))
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_IndexError, N_("list index out of range"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      li = list_find(self->list, (long) index);
Karsten Hopp 6a8140
      if (li == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	/* No more suitable format specifications in python-2.3 */
Karsten Hopp 6a8140
! 	PyErr_VIM_FORMAT(N_("internal error: failed to get vim list item %d"),
Karsten Hopp 6a8140
  		(int) index);
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2331,2337 ****
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      if (index > length || (index == length && obj == NULL))
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_IndexError, "list index out of range");
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 2333,2339 ----
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      if (index > length || (index == length && obj == NULL))
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_IndexError, N_("list index out of range"));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2352,2358 ****
Karsten Hopp 6a8140
  	if (list_append_tv(l, &tv) == FAIL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    clear_tv(&tv;;
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM("failed to add item to list");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
--- 2354,2360 ----
Karsten Hopp 6a8140
  	if (list_append_tv(l, &tv) == FAIL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    clear_tv(&tv;;
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM(N_("failed to add item to list"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2393,2399 ****
Karsten Hopp 6a8140
  	li = list_find(l, (long) first);
Karsten Hopp 6a8140
  	if (li == NULL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_VIM_FORMAT("internal error: no vim list item %d", (int)first);
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	if (last > first)
Karsten Hopp 6a8140
--- 2395,2402 ----
Karsten Hopp 6a8140
  	li = list_find(l, (long) first);
Karsten Hopp 6a8140
  	if (li == NULL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_VIM_FORMAT(N_("internal error: no vim list item %d"),
Karsten Hopp 6a8140
! 		    (int)first);
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	if (last > first)
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2426,2432 ****
Karsten Hopp 6a8140
  	if (list_insert_tv(l, &v, li) == FAIL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    clear_tv(&v);
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM("internal error: failed to add item to list");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	clear_tv(&v);
Karsten Hopp 6a8140
--- 2429,2435 ----
Karsten Hopp 6a8140
  	if (list_insert_tv(l, &v, li) == FAIL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    clear_tv(&v);
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM(N_("internal error: failed to add item to list"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	clear_tv(&v);
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2478,2484 ****
Karsten Hopp 6a8140
      if (valObject == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_AttributeError,
Karsten Hopp 6a8140
! 		"cannot delete vim.List attributes");
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 2481,2487 ----
Karsten Hopp 6a8140
      if (valObject == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_AttributeError,
Karsten Hopp 6a8140
! 		N_("cannot delete vim.List attributes"));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2486,2492 ****
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	if (self->list->lv_lock == VAR_FIXED)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_SET_STRING(PyExc_TypeError, "cannot modify fixed list");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
--- 2489,2495 ----
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	if (self->list->lv_lock == VAR_FIXED)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_SET_STRING(PyExc_TypeError, N_("cannot modify fixed list"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2503,2509 ****
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_FORMAT(PyExc_AttributeError, "cannot set attribute %s", name);
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
--- 2506,2512 ----
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_FORMAT(PyExc_AttributeError, N_("cannot set attribute %s"), name);
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2539,2545 ****
Karsten Hopp 6a8140
  	if (!translated_function_exists(name))
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    "unnamed function %s does not exist", name);
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	self->name = vim_strsave(name);
Karsten Hopp 6a8140
--- 2542,2548 ----
Karsten Hopp 6a8140
  	if (!translated_function_exists(name))
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    N_("unnamed function %s does not exist"), name);
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	self->name = vim_strsave(name);
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2550,2556 ****
Karsten Hopp 6a8140
  				    vim_strchr(name, AUTOLOAD_CHAR) == NULL))
Karsten Hopp 6a8140
  		== NULL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_FORMAT(PyExc_ValueError, "function %s does not exist", name);
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 2553,2560 ----
Karsten Hopp 6a8140
  				    vim_strchr(name, AUTOLOAD_CHAR) == NULL))
Karsten Hopp 6a8140
  		== NULL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_FORMAT(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    N_("function %s does not exist"), name);
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2566,2572 ****
Karsten Hopp 6a8140
      if (kwargs)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_TypeError,
Karsten Hopp 6a8140
! 		"function constructor does not accept keyword arguments");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 2570,2576 ----
Karsten Hopp 6a8140
      if (kwargs)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_TypeError,
Karsten Hopp 6a8140
! 		N_("function constructor does not accept keyword arguments"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2643,2649 ****
Karsten Hopp 6a8140
      else if (error != OK)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	ret = NULL;
Karsten Hopp 6a8140
! 	PyErr_VIM_FORMAT("failed to run function %s", (char *)name);
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
  	ret = ConvertToPyObject(&rettv);
Karsten Hopp 6a8140
--- 2647,2653 ----
Karsten Hopp 6a8140
      else if (error != OK)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	ret = NULL;
Karsten Hopp 6a8140
! 	PyErr_VIM_FORMAT(N_("failed to run function %s"), (char *)name);
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
  	ret = ConvertToPyObject(&rettv);
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2796,2808 ****
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_RuntimeError,
Karsten Hopp 6a8140
! 		    "unable to get option value");
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM("internal error: unknown option type");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
--- 2800,2812 ----
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_RuntimeError,
Karsten Hopp 6a8140
! 		    N_("unable to get option value"));
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM(N_("internal error: unknown option type"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2845,2851 ****
Karsten Hopp 6a8140
  	    {
Karsten Hopp 6a8140
  		if (VimTryEnd())
Karsten Hopp 6a8140
  		    return -1;
Karsten Hopp 6a8140
! 		PyErr_SET_VIM("problem while switching windows");
Karsten Hopp 6a8140
  		return -1;
Karsten Hopp 6a8140
  	    }
Karsten Hopp 6a8140
  	    set_ret = set_option_value_err(key, numval, stringval, opt_flags);
Karsten Hopp 6a8140
--- 2849,2855 ----
Karsten Hopp 6a8140
  	    {
Karsten Hopp 6a8140
  		if (VimTryEnd())
Karsten Hopp 6a8140
  		    return -1;
Karsten Hopp 6a8140
! 		PyErr_SET_VIM(N_("problem while switching windows"));
Karsten Hopp 6a8140
  		return -1;
Karsten Hopp 6a8140
  	    }
Karsten Hopp 6a8140
  	    set_ret = set_option_value_err(key, numval, stringval, opt_flags);
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2902,2916 ****
Karsten Hopp 6a8140
  	if (self->opt_type == SREQ_GLOBAL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    "unable to unset global option %s", key);
Karsten Hopp 6a8140
  	    Py_XDECREF(todecref);
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else if (!(flags & SOPT_GLOBAL))
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    "unable to unset option %s "
Karsten Hopp 6a8140
! 		    "which does not have global value", key);
Karsten Hopp 6a8140
  	    Py_XDECREF(todecref);
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
--- 2906,2920 ----
Karsten Hopp 6a8140
  	if (self->opt_type == SREQ_GLOBAL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    N_("unable to unset global option %s"), key);
Karsten Hopp 6a8140
  	    Py_XDECREF(todecref);
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else if (!(flags & SOPT_GLOBAL))
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    N_("unable to unset option %s "
Karsten Hopp 6a8140
! 		       "which does not have global value"), key);
Karsten Hopp 6a8140
  	    Py_XDECREF(todecref);
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 2988,2994 ****
Karsten Hopp 6a8140
  {
Karsten Hopp 6a8140
      if (self->tab == INVALID_TABPAGE_VALUE)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM("attempt to refer to deleted tab page");
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 2992,2998 ----
Karsten Hopp 6a8140
  {
Karsten Hopp 6a8140
      if (self->tab == INVALID_TABPAGE_VALUE)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM(N_("attempt to refer to deleted tab page"));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3132,3138 ****
Karsten Hopp 6a8140
  	if (n == 0)
Karsten Hopp 6a8140
  	    return TabPageNew(tp);
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
!     PyErr_SET_STRING(PyExc_IndexError, "no such tab page");
Karsten Hopp 6a8140
      return NULL;
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 3136,3142 ----
Karsten Hopp 6a8140
  	if (n == 0)
Karsten Hopp 6a8140
  	    return TabPageNew(tp);
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
!     PyErr_SET_STRING(PyExc_IndexError, N_("no such tab page"));
Karsten Hopp 6a8140
      return NULL;
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3154,3160 ****
Karsten Hopp 6a8140
  {
Karsten Hopp 6a8140
      if (self->win == INVALID_WINDOW_VALUE)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM("attempt to refer to deleted window");
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 3158,3164 ----
Karsten Hopp 6a8140
  {
Karsten Hopp 6a8140
      if (self->win == INVALID_WINDOW_VALUE)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM(N_("attempt to refer to deleted window"));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3320,3326 ****
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (strcmp(name, "buffer") == 0)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_TypeError, "readonly attribute: buffer");
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      else if (strcmp(name, "cursor") == 0)
Karsten Hopp 6a8140
--- 3324,3330 ----
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (strcmp(name, "buffer") == 0)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_TypeError, N_("readonly attribute: buffer"));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      else if (strcmp(name, "cursor") == 0)
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3333,3339 ****
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
  	if (lnum <= 0 || lnum > self->win->w_buffer->b_ml.ml_line_count)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM("cursor position outside buffer");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 3337,3343 ----
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
  	if (lnum <= 0 || lnum > self->win->w_buffer->b_ml.ml_line_count)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM(N_("cursor position outside buffer"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3496,3502 ****
Karsten Hopp 6a8140
  	if (n == 0)
Karsten Hopp 6a8140
  	    return WindowNew(w, self->tabObject? self->tabObject->tab: curtab);
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
!     PyErr_SET_STRING(PyExc_IndexError, "no such window");
Karsten Hopp 6a8140
      return NULL;
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 3500,3506 ----
Karsten Hopp 6a8140
  	if (n == 0)
Karsten Hopp 6a8140
  	    return WindowNew(w, self->tabObject? self->tabObject->tab: curtab);
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
!     PyErr_SET_STRING(PyExc_IndexError, N_("no such window"));
Karsten Hopp 6a8140
      return NULL;
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3550,3556 ****
Karsten Hopp 6a8140
  	    --len;
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM("string cannot contain newlines");
Karsten Hopp 6a8140
  	    Py_XDECREF(bytes);
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
--- 3554,3560 ----
Karsten Hopp 6a8140
  	    --len;
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM(N_("string cannot contain newlines"));
Karsten Hopp 6a8140
  	    Py_XDECREF(bytes);
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3688,3694 ****
Karsten Hopp 6a8140
  	if (u_savedel((linenr_T)n, 1L) == FAIL)
Karsten Hopp 6a8140
  	    RAISE_UNDO_FAIL;
Karsten Hopp 6a8140
  	else if (ml_delete((linenr_T)n, FALSE) == FAIL)
Karsten Hopp 6a8140
! 	    RAISE_LINE_FAIL("delete");
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    if (buf == savebuf)
Karsten Hopp 6a8140
--- 3692,3698 ----
Karsten Hopp 6a8140
  	if (u_savedel((linenr_T)n, 1L) == FAIL)
Karsten Hopp 6a8140
  	    RAISE_UNDO_FAIL;
Karsten Hopp 6a8140
  	else if (ml_delete((linenr_T)n, FALSE) == FAIL)
Karsten Hopp 6a8140
! 	    RAISE_DELETE_LINE_FAIL;
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    if (buf == savebuf)
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3727,3733 ****
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else if (ml_replace((linenr_T)n, (char_u *)save, FALSE) == FAIL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    RAISE_LINE_FAIL("replace");
Karsten Hopp 6a8140
  	    vim_free(save);
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
--- 3731,3737 ----
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else if (ml_replace((linenr_T)n, (char_u *)save, FALSE) == FAIL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    RAISE_REPLACE_LINE_FAIL;
Karsten Hopp 6a8140
  	    vim_free(save);
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3794,3800 ****
Karsten Hopp 6a8140
  	    {
Karsten Hopp 6a8140
  		if (ml_delete((linenr_T)lo, FALSE) == FAIL)
Karsten Hopp 6a8140
  		{
Karsten Hopp 6a8140
! 		    RAISE_LINE_FAIL("delete");
Karsten Hopp 6a8140
  		    break;
Karsten Hopp 6a8140
  		}
Karsten Hopp 6a8140
  	    }
Karsten Hopp 6a8140
--- 3798,3804 ----
Karsten Hopp 6a8140
  	    {
Karsten Hopp 6a8140
  		if (ml_delete((linenr_T)lo, FALSE) == FAIL)
Karsten Hopp 6a8140
  		{
Karsten Hopp 6a8140
! 		    RAISE_DELETE_LINE_FAIL;
Karsten Hopp 6a8140
  		    break;
Karsten Hopp 6a8140
  		}
Karsten Hopp 6a8140
  	    }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3866,3872 ****
Karsten Hopp 6a8140
  	    for (i = 0; i < old_len - new_len; ++i)
Karsten Hopp 6a8140
  		if (ml_delete((linenr_T)lo, FALSE) == FAIL)
Karsten Hopp 6a8140
  		{
Karsten Hopp 6a8140
! 		    RAISE_LINE_FAIL("delete");
Karsten Hopp 6a8140
  		    break;
Karsten Hopp 6a8140
  		}
Karsten Hopp 6a8140
  	    extra -= i;
Karsten Hopp 6a8140
--- 3870,3876 ----
Karsten Hopp 6a8140
  	    for (i = 0; i < old_len - new_len; ++i)
Karsten Hopp 6a8140
  		if (ml_delete((linenr_T)lo, FALSE) == FAIL)
Karsten Hopp 6a8140
  		{
Karsten Hopp 6a8140
! 		    RAISE_DELETE_LINE_FAIL;
Karsten Hopp 6a8140
  		    break;
Karsten Hopp 6a8140
  		}
Karsten Hopp 6a8140
  	    extra -= i;
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3882,3888 ****
Karsten Hopp 6a8140
  		if (ml_replace((linenr_T)(lo+i), (char_u *)array[i], FALSE)
Karsten Hopp 6a8140
  								      == FAIL)
Karsten Hopp 6a8140
  		{
Karsten Hopp 6a8140
! 		    RAISE_LINE_FAIL("replace");
Karsten Hopp 6a8140
  		    break;
Karsten Hopp 6a8140
  		}
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
--- 3886,3892 ----
Karsten Hopp 6a8140
  		if (ml_replace((linenr_T)(lo+i), (char_u *)array[i], FALSE)
Karsten Hopp 6a8140
  								      == FAIL)
Karsten Hopp 6a8140
  		{
Karsten Hopp 6a8140
! 		    RAISE_REPLACE_LINE_FAIL;
Karsten Hopp 6a8140
  		    break;
Karsten Hopp 6a8140
  		}
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3900,3906 ****
Karsten Hopp 6a8140
  		if (ml_append((linenr_T)(lo + i - 1),
Karsten Hopp 6a8140
  					(char_u *)array[i], 0, FALSE) == FAIL)
Karsten Hopp 6a8140
  		{
Karsten Hopp 6a8140
! 		    RAISE_LINE_FAIL("insert");
Karsten Hopp 6a8140
  		    break;
Karsten Hopp 6a8140
  		}
Karsten Hopp 6a8140
  		vim_free(array[i]);
Karsten Hopp 6a8140
--- 3904,3910 ----
Karsten Hopp 6a8140
  		if (ml_append((linenr_T)(lo + i - 1),
Karsten Hopp 6a8140
  					(char_u *)array[i], 0, FALSE) == FAIL)
Karsten Hopp 6a8140
  		{
Karsten Hopp 6a8140
! 		    RAISE_INSERT_LINE_FAIL;
Karsten Hopp 6a8140
  		    break;
Karsten Hopp 6a8140
  		}
Karsten Hopp 6a8140
  		vim_free(array[i]);
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 3979,3985 ****
Karsten Hopp 6a8140
  	if (u_save((linenr_T)n, (linenr_T)(n+1)) == FAIL)
Karsten Hopp 6a8140
  	    RAISE_UNDO_FAIL;
Karsten Hopp 6a8140
  	else if (ml_append((linenr_T)n, (char_u *)str, 0, FALSE) == FAIL)
Karsten Hopp 6a8140
! 	    RAISE_LINE_FAIL("insert");
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
  	    appended_lines_mark((linenr_T)n, 1L);
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 3983,3989 ----
Karsten Hopp 6a8140
  	if (u_save((linenr_T)n, (linenr_T)(n+1)) == FAIL)
Karsten Hopp 6a8140
  	    RAISE_UNDO_FAIL;
Karsten Hopp 6a8140
  	else if (ml_append((linenr_T)n, (char_u *)str, 0, FALSE) == FAIL)
Karsten Hopp 6a8140
! 	    RAISE_INSERT_LINE_FAIL;
Karsten Hopp 6a8140
  	else
Karsten Hopp 6a8140
  	    appended_lines_mark((linenr_T)n, 1L);
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4036,4042 ****
Karsten Hopp 6a8140
  		if (ml_append((linenr_T)(n + i),
Karsten Hopp 6a8140
  					(char_u *)array[i], 0, FALSE) == FAIL)
Karsten Hopp 6a8140
  		{
Karsten Hopp 6a8140
! 		    RAISE_LINE_FAIL("insert");
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
  		    /* Free the rest of the lines */
Karsten Hopp 6a8140
  		    while (i < size)
Karsten Hopp 6a8140
--- 4040,4046 ----
Karsten Hopp 6a8140
  		if (ml_append((linenr_T)(n + i),
Karsten Hopp 6a8140
  					(char_u *)array[i], 0, FALSE) == FAIL)
Karsten Hopp 6a8140
  		{
Karsten Hopp 6a8140
! 		    RAISE_INSERT_LINE_FAIL;
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
  		    /* Free the rest of the lines */
Karsten Hopp 6a8140
  		    while (i < size)
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4089,4095 ****
Karsten Hopp 6a8140
  {
Karsten Hopp 6a8140
      if (self->buf == INVALID_BUFFER_VALUE)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM("attempt to refer to deleted buffer");
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 4093,4099 ----
Karsten Hopp 6a8140
  {
Karsten Hopp 6a8140
      if (self->buf == INVALID_BUFFER_VALUE)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM(N_("attempt to refer to deleted buffer"));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4110,4116 ****
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (n < 0 || n > end - start)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_IndexError, "line number out of range");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 4114,4120 ----
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (n < 0 || n > end - start)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_IndexError, N_("line number out of range"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4166,4172 ****
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (n < 0 || n > end - start)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_IndexError, "line number out of range");
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 4170,4176 ----
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (n < 0 || n > end - start)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_IndexError, N_("line number out of range"));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4250,4256 ****
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (n < 0 || n > max)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_IndexError, "line number out of range");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 4254,4260 ----
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (n < 0 || n > max)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_STRING(PyExc_IndexError, N_("line number out of range"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4533,4539 ****
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
  	if (ren_ret == FAIL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM("failed to rename buffer");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	return 0;
Karsten Hopp 6a8140
--- 4537,4543 ----
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
  	if (ren_ret == FAIL)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM(N_("failed to rename buffer"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  	return 0;
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4569,4575 ****
Karsten Hopp 6a8140
      if (pmark[0] == '\0' || pmark[1] != '\0')
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_ValueError,
Karsten Hopp 6a8140
! 		"mark name must be a single character");
Karsten Hopp 6a8140
  	Py_XDECREF(todecref);
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
--- 4573,4579 ----
Karsten Hopp 6a8140
      if (pmark[0] == '\0' || pmark[1] != '\0')
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_SET_STRING(PyExc_ValueError,
Karsten Hopp 6a8140
! 		N_("mark name must be a single character"));
Karsten Hopp 6a8140
  	Py_XDECREF(todecref);
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4587,4593 ****
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (posp == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM("invalid mark name");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 4591,4597 ----
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
      if (posp == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM(N_("invalid mark name"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4812,4818 ****
Karsten Hopp 6a8140
  	if (valObject->ob_type != &BufferType)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		    "expected vim.Buffer object, but got %s",
Karsten Hopp 6a8140
  		    Py_TYPE_NAME(valObject));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
--- 4816,4822 ----
Karsten Hopp 6a8140
  	if (valObject->ob_type != &BufferType)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		    N_("expected vim.Buffer object, but got %s"),
Karsten Hopp 6a8140
  		    Py_TYPE_NAME(valObject));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4826,4832 ****
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    if (VimTryEnd())
Karsten Hopp 6a8140
  		return -1;
Karsten Hopp 6a8140
! 	    PyErr_VIM_FORMAT("failed to switch to buffer %d", count);
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 4830,4836 ----
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    if (VimTryEnd())
Karsten Hopp 6a8140
  		return -1;
Karsten Hopp 6a8140
! 	    PyErr_VIM_FORMAT(N_("failed to switch to buffer %d"), count);
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4839,4845 ****
Karsten Hopp 6a8140
  	if (valObject->ob_type != &WindowType)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		    "expected vim.Window object, but got %s",
Karsten Hopp 6a8140
  		    Py_TYPE_NAME(valObject));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
--- 4843,4849 ----
Karsten Hopp 6a8140
  	if (valObject->ob_type != &WindowType)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		    N_("expected vim.Window object, but got %s"),
Karsten Hopp 6a8140
  		    Py_TYPE_NAME(valObject));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4851,4857 ****
Karsten Hopp 6a8140
  	if (!count)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    "failed to find window in the current tab page");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 4855,4861 ----
Karsten Hopp 6a8140
  	if (!count)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_ValueError,
Karsten Hopp 6a8140
! 		    N_("failed to find window in the current tab page"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4862,4868 ****
Karsten Hopp 6a8140
  	    if (VimTryEnd())
Karsten Hopp 6a8140
  		return -1;
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_RuntimeError,
Karsten Hopp 6a8140
! 		    "did not switch to the specified window");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 4866,4872 ----
Karsten Hopp 6a8140
  	    if (VimTryEnd())
Karsten Hopp 6a8140
  		return -1;
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_RuntimeError,
Karsten Hopp 6a8140
! 		    N_("did not switch to the specified window"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4873,4879 ****
Karsten Hopp 6a8140
  	if (valObject->ob_type != &TabPageType)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		    "expected vim.TabPage object, but got %s",
Karsten Hopp 6a8140
  		    Py_TYPE_NAME(valObject));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
--- 4877,4883 ----
Karsten Hopp 6a8140
  	if (valObject->ob_type != &TabPageType)
Karsten Hopp 6a8140
  	{
Karsten Hopp 6a8140
  	    PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		    N_("expected vim.TabPage object, but got %s"),
Karsten Hopp 6a8140
  		    Py_TYPE_NAME(valObject));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 4888,4894 ****
Karsten Hopp 6a8140
  	    if (VimTryEnd())
Karsten Hopp 6a8140
  		return -1;
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_RuntimeError,
Karsten Hopp 6a8140
! 		    "did not switch to the specified tab page");
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
--- 4892,4898 ----
Karsten Hopp 6a8140
  	    if (VimTryEnd())
Karsten Hopp 6a8140
  		return -1;
Karsten Hopp 6a8140
  	    PyErr_SET_STRING(PyExc_RuntimeError,
Karsten Hopp 6a8140
! 		    N_("did not switch to the specified tab page"));
Karsten Hopp 6a8140
  	    return -1;
Karsten Hopp 6a8140
  	}
Karsten Hopp 6a8140
  
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 5371,5377 ****
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		"unable to convert %s to vim dictionary",
Karsten Hopp 6a8140
  		Py_TYPE_NAME(obj));
Karsten Hopp 6a8140
  	ret = -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
--- 5375,5381 ----
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		N_("unable to convert %s to vim dictionary"),
Karsten Hopp 6a8140
  		Py_TYPE_NAME(obj));
Karsten Hopp 6a8140
  	ret = -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 5498,5504 ****
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		"unable to convert %s to vim structure",
Karsten Hopp 6a8140
  		Py_TYPE_NAME(obj));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
--- 5502,5508 ----
Karsten Hopp 6a8140
      else
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp 6a8140
! 		N_("unable to convert %s to vim structure"),
Karsten Hopp 6a8140
  		Py_TYPE_NAME(obj));
Karsten Hopp 6a8140
  	return -1;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 5510,5516 ****
Karsten Hopp 6a8140
  {
Karsten Hopp 6a8140
      if (tv == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM("internal error: NULL reference passed");
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      switch (tv->v_type)
Karsten Hopp 6a8140
--- 5514,5520 ----
Karsten Hopp 6a8140
  {
Karsten Hopp 6a8140
      if (tv == NULL)
Karsten Hopp 6a8140
      {
Karsten Hopp 6a8140
! 	PyErr_SET_VIM(N_("internal error: NULL reference passed"));
Karsten Hopp 6a8140
  	return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
      switch (tv->v_type)
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 5535,5541 ****
Karsten Hopp 6a8140
  	    Py_INCREF(Py_None);
Karsten Hopp 6a8140
  	    return Py_None;
Karsten Hopp 6a8140
  	default:
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM("internal error: invalid value type");
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
--- 5539,5545 ----
Karsten Hopp 6a8140
  	    Py_INCREF(Py_None);
Karsten Hopp 6a8140
  	    return Py_None;
Karsten Hopp 6a8140
  	default:
Karsten Hopp 6a8140
! 	    PyErr_SET_VIM(N_("internal error: invalid value type"));
Karsten Hopp 6a8140
  	    return NULL;
Karsten Hopp 6a8140
      }
Karsten Hopp 6a8140
  }
Karsten Hopp 6a8140
*** ../vim-7.3.1233/src/version.c	2013-06-23 14:37:00.000000000 +0200
Karsten Hopp 6a8140
--- src/version.c	2013-06-23 14:41:34.000000000 +0200
Karsten Hopp 6a8140
***************
Karsten Hopp 6a8140
*** 730,731 ****
Karsten Hopp 6a8140
--- 730,733 ----
Karsten Hopp 6a8140
  {   /* Add new patch number below this line */
Karsten Hopp 6a8140
+ /**/
Karsten Hopp 6a8140
+     1234,
Karsten Hopp 6a8140
  /**/
Karsten Hopp 6a8140
Karsten Hopp 6a8140
-- 
Karsten Hopp 6a8140
       Bravely bold Sir Robin, rode forth from Camelot,
Karsten Hopp 6a8140
       He was not afraid to die, Oh Brave Sir Robin,
Karsten Hopp 6a8140
       He was not at all afraid to be killed in nasty ways
Karsten Hopp 6a8140
       Brave, brave, brave, brave Sir Robin.
Karsten Hopp 6a8140
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp 6a8140
Karsten Hopp 6a8140
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 6a8140
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 6a8140
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 6a8140
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///