To: vim_dev@googlegroups.com Subject: Patch 8.2.0740 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0740 Problem: Minor message mistakes. Solution: Change vim to Vim and other fixes. Files: src/if_py_both.h, src/if_tcl.c, src/main.c *** ../vim-8.2.0739/src/if_py_both.h 2020-04-28 00:02:37.648975818 +0200 --- src/if_py_both.h 2020-05-11 23:07:08.282572721 +0200 *************** *** 652,658 **** } else if (!did_throw) return (PyErr_Occurred() ? -1 : 0); ! // Python exception is preferred over vim one; unlikely to occur though else if (PyErr_Occurred()) { discard_current_exception(); --- 652,658 ---- } else if (!did_throw) return (PyErr_Occurred() ? -1 : 0); ! // Python exception is preferred over Vim one; unlikely to occur though else if (PyErr_Occurred()) { discard_current_exception(); *************** *** 1406,1412 **** // name, function, calling, documentation {"command", VimCommand, METH_O, "Execute a Vim ex-mode command" }, {"eval", VimEval, METH_VARARGS, "Evaluate an expression using Vim evaluator" }, ! {"bindeval", VimEvalPy, METH_O, "Like eval(), but returns objects attached to vim ones"}, {"strwidth", VimStrwidth, METH_O, "Screen string width, counts as having width 1"}, {"chdir", (PyCFunction)VimChdir, METH_VARARGS|METH_KEYWORDS, "Change directory"}, {"fchdir", (PyCFunction)VimFchdir, METH_VARARGS|METH_KEYWORDS, "Change directory"}, --- 1406,1412 ---- // name, function, calling, documentation {"command", VimCommand, METH_O, "Execute a Vim ex-mode command" }, {"eval", VimEval, METH_VARARGS, "Evaluate an expression using Vim evaluator" }, ! {"bindeval", VimEvalPy, METH_O, "Like eval(), but returns objects attached to Vim ones"}, {"strwidth", VimStrwidth, METH_O, "Screen string width, counts as having width 1"}, {"chdir", (PyCFunction)VimChdir, METH_VARARGS|METH_KEYWORDS, "Change directory"}, {"fchdir", (PyCFunction)VimFchdir, METH_VARARGS|METH_KEYWORDS, "Change directory"}, *************** *** 2393,2399 **** if (li == NULL) { // No more suitable format specifications in python-2.3 ! PyErr_VIM_FORMAT(N_("internal error: failed to get vim list item %d"), (int) index); return NULL; } --- 2393,2399 ---- if (li == NULL) { // No more suitable format specifications in python-2.3 ! PyErr_VIM_FORMAT(N_("internal error: failed to get Vim list item %d"), (int) index); return NULL; } *************** *** 2555,2561 **** li = list_find(l, (long) first); if (li == NULL) { ! PyErr_VIM_FORMAT(N_("internal error: no vim list item %d"), (int)first); if (obj != NULL) PyMem_Free(lis); --- 2555,2561 ---- li = list_find(l, (long) first); if (li == NULL) { ! PyErr_VIM_FORMAT(N_("internal error: no Vim list item %d"), (int)first); if (obj != NULL) PyMem_Free(lis); *************** *** 4267,4273 **** /* * Create a copy of the string, with internal nulls replaced by ! * newline characters, as is the vim convention. */ save = alloc(len+1); if (save == NULL) --- 4267,4273 ---- /* * Create a copy of the string, with internal nulls replaced by ! * newline characters, as is the Vim convention. */ save = alloc(len+1); if (save == NULL) *************** *** 4614,4620 **** // Now we may need to insert the remaining new old_len. If we do, we // must free the strings as we finish with them (we can't pass the ! // responsibility to vim in this case). if (!PyErr_Occurred()) { while (i < new_len) --- 4614,4620 ---- // Now we may need to insert the remaining new old_len. If we do, we // must free the strings as we finish with them (we can't pass the ! // responsibility to Vim in this case). if (!PyErr_Occurred()) { while (i < new_len) *************** *** 5825,5831 **** else { if (ConvertFromPyObject(run_ret, rettv) == -1) ! emsg(_("E859: Failed to convert returned python object to vim value")); Py_DECREF(run_ret); } PyErr_Clear(); --- 5825,5831 ---- else { if (ConvertFromPyObject(run_ret, rettv) == -1) ! emsg(_("E859: Failed to convert returned python object to a Vim value")); Py_DECREF(run_ret); } PyErr_Clear(); *************** *** 6159,6165 **** else { PyErr_FORMAT(PyExc_TypeError, ! N_("unable to convert %s to vim dictionary"), Py_TYPE_NAME(obj)); ret = -1; } --- 6159,6165 ---- else { PyErr_FORMAT(PyExc_TypeError, ! N_("unable to convert %s to a Vim dictionary"), Py_TYPE_NAME(obj)); ret = -1; } *************** *** 6188,6194 **** else { PyErr_FORMAT(PyExc_TypeError, ! N_("unable to convert %s to vim list"), Py_TYPE_NAME(obj)); ret = -1; } --- 6188,6194 ---- else { PyErr_FORMAT(PyExc_TypeError, ! N_("unable to convert %s to a Vim list"), Py_TYPE_NAME(obj)); ret = -1; } *************** *** 6333,6339 **** else { PyErr_FORMAT(PyExc_TypeError, ! N_("unable to convert %s to vim structure"), Py_TYPE_NAME(obj)); return -1; } --- 6333,6339 ---- else { PyErr_FORMAT(PyExc_TypeError, ! N_("unable to convert %s to a Vim structure"), Py_TYPE_NAME(obj)); return -1; } *************** *** 6575,6581 **** DictionaryType.tp_as_sequence = &DictionaryAsSeq; DictionaryType.tp_as_mapping = &DictionaryAsMapping; DictionaryType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE; ! DictionaryType.tp_doc = "dictionary pushing modifications to vim structure"; DictionaryType.tp_methods = DictionaryMethods; DictionaryType.tp_iter = (getiterfunc)DictionaryIter; DictionaryType.tp_new = (newfunc)DictionaryConstructor; --- 6575,6581 ---- DictionaryType.tp_as_sequence = &DictionaryAsSeq; DictionaryType.tp_as_mapping = &DictionaryAsMapping; DictionaryType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE; ! DictionaryType.tp_doc = "dictionary pushing modifications to Vim structure"; DictionaryType.tp_methods = DictionaryMethods; DictionaryType.tp_iter = (getiterfunc)DictionaryIter; DictionaryType.tp_new = (newfunc)DictionaryConstructor; *************** *** 6595,6601 **** ListType.tp_as_sequence = &ListAsSeq; ListType.tp_as_mapping = &ListAsMapping; ListType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE; ! ListType.tp_doc = "list pushing modifications to vim structure"; ListType.tp_methods = ListMethods; ListType.tp_iter = (getiterfunc)ListIter; ListType.tp_new = (newfunc)ListConstructor; --- 6595,6601 ---- ListType.tp_as_sequence = &ListAsSeq; ListType.tp_as_mapping = &ListAsMapping; ListType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE; ! ListType.tp_doc = "list pushing modifications to Vim structure"; ListType.tp_methods = ListMethods; ListType.tp_iter = (getiterfunc)ListIter; ListType.tp_new = (newfunc)ListConstructor; *************** *** 6614,6620 **** FunctionType.tp_dealloc = (destructor)FunctionDestructor; FunctionType.tp_call = (ternaryfunc)FunctionCall; FunctionType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE; ! FunctionType.tp_doc = "object that calls vim function"; FunctionType.tp_methods = FunctionMethods; FunctionType.tp_repr = (reprfunc)FunctionRepr; FunctionType.tp_new = (newfunc)FunctionConstructor; --- 6614,6620 ---- FunctionType.tp_dealloc = (destructor)FunctionDestructor; FunctionType.tp_call = (ternaryfunc)FunctionCall; FunctionType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE; ! FunctionType.tp_doc = "object that calls Vim function"; FunctionType.tp_methods = FunctionMethods; FunctionType.tp_repr = (reprfunc)FunctionRepr; FunctionType.tp_new = (newfunc)FunctionConstructor; *** ../vim-8.2.0739/src/if_tcl.c 2020-03-29 20:51:03.085780722 +0200 --- src/if_tcl.c 2020-05-11 23:08:40.022178610 +0200 *************** *** 1403,1409 **** } else if (did_emsg) { ! Tcl_SetResult(interp, _("vim error"), TCL_STATIC); return TCL_ERROR; } return TCL_OK; --- 1403,1409 ---- } else if (did_emsg) { ! Tcl_SetResult(interp, _("Vim error"), TCL_STATIC); return TCL_ERROR; } return TCL_OK; *** ../vim-8.2.0739/src/main.c 2020-04-12 19:37:13.518297259 +0200 --- src/main.c 2020-05-11 23:09:56.473850138 +0200 *************** *** 3562,3568 **** #endif #if (defined(UNIX) || defined(VMS)) && defined(FEAT_X11) # if defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) ! main_msg(_("-display \tConnect vim to this particular X-server")); # endif main_msg(_("-X\t\t\tDo not connect to X server")); #endif --- 3562,3568 ---- #endif #if (defined(UNIX) || defined(VMS)) && defined(FEAT_X11) # if defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) ! main_msg(_("-display \tConnect Vim to this particular X-server")); # endif main_msg(_("-X\t\t\tDo not connect to X server")); #endif *************** *** 3599,3605 **** # endif # endif # endif ! main_msg(_("-display \tRun vim on ")); main_msg(_("-iconic\t\tStart vim iconified")); main_msg(_("-background \tUse for the background (also: -bg)")); main_msg(_("-foreground \tUse for normal text (also: -fg)")); --- 3599,3605 ---- # endif # endif # endif ! main_msg(_("-display \tRun Vim on ")); main_msg(_("-iconic\t\tStart vim iconified")); main_msg(_("-background \tUse for the background (also: -bg)")); main_msg(_("-foreground \tUse for normal text (also: -fg)")); *************** *** 3621,3627 **** main_msg(_("-font \t\tUse for normal text (also: -fn)")); main_msg(_("-geometry \tUse for initial geometry (also: -geom)")); main_msg(_("-reverse\t\tUse reverse video (also: -rv)")); ! main_msg(_("-display \tRun vim on (also: --display)")); main_msg(_("--role \tSet a unique role to identify the main window")); main_msg(_("--socketid \tOpen Vim inside another GTK widget")); main_msg(_("--echo-wid\t\tMake gvim echo the Window ID on stdout")); --- 3621,3627 ---- main_msg(_("-font \t\tUse for normal text (also: -fn)")); main_msg(_("-geometry \tUse for initial geometry (also: -geom)")); main_msg(_("-reverse\t\tUse reverse video (also: -rv)")); ! main_msg(_("-display \tRun Vim on (also: --display)")); main_msg(_("--role \tSet a unique role to identify the main window")); main_msg(_("--socketid \tOpen Vim inside another GTK widget")); main_msg(_("--echo-wid\t\tMake gvim echo the Window ID on stdout")); *** ../vim-8.2.0739/src/version.c 2020-05-11 22:13:24.793171617 +0200 --- src/version.c 2020-05-11 23:11:47.257374118 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 740, /**/ -- From "know your smileys": 8-O "Omigod!!" (done "rm -rf *" ?) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///