To: vim-dev@vim.org Subject: Patch 6.1.211 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.211 Problem: The message "use ! to override" is confusing. Solution: Make it "add ! to override". Files: src/buffer.c, src/eval.c, src/ex_docmd.c, src/fileio.c, src/globals.h *** ../vim61.210/src/buffer.c Thu Jul 4 21:59:55 2002 --- src/buffer.c Sun Oct 6 20:22:18 2002 *************** *** 869,875 **** if (!forceit && bufIsChanged(buf)) { ! EMSGN(_("E89: No write since last change for buffer %ld (use ! to override)"), buf->b_fnum); return FAIL; } --- 869,875 ---- if (!forceit && bufIsChanged(buf)) { ! EMSGN(_("E89: No write since last change for buffer %ld (add ! to override)"), buf->b_fnum); return FAIL; } *** ../vim61.210/src/eval.c Mon Sep 23 20:58:27 2002 --- src/eval.c Mon Oct 7 20:34:01 2002 *************** *** 7618,7624 **** int indent; int nesting; int in_append = FALSE; ! static char_u e_funcexts[] = N_("E122: Function %s already exists, use ! to replace"); /* * ":function" without argument: list functions. --- 7618,7624 ---- int indent; int nesting; int in_append = FALSE; ! static char_u e_funcexts[] = N_("E122: Function %s already exists, add ! to replace it"); /* * ":function" without argument: list functions. *** ../vim61.210/src/ex_docmd.c Tue Oct 1 20:20:25 2002 --- src/ex_docmd.c Mon Oct 7 20:34:15 2002 *************** *** 3927,3933 **** { if (!force) { ! EMSG(_("E174: Command already exists: use ! to redefine")); goto fail; } --- 3927,3933 ---- { if (!force) { ! EMSG(_("E174: Command already exists: add ! to replace it")); goto fail; } *************** *** 6801,6807 **** #endif if (!forceit && *mode != 'a' && vim_fexists(fname)) { ! EMSG2(_("E189: \"%s\" exists (use ! to override)"), fname); return NULL; } --- 6804,6810 ---- #endif if (!forceit && *mode != 'a' && vim_fexists(fname)) { ! EMSG2(_("E189: \"%s\" exists (add ! to override)"), fname); return NULL; } *** ../vim61.210/src/fileio.c Mon Oct 7 20:09:28 2002 --- src/fileio.c Mon Oct 7 20:36:18 2002 *************** *** 2597,2603 **** if (vim_strchr(p_cpo, CPO_FWRITE) != NULL) errmsg = (char_u *)_(err_readonly); else ! errmsg = (char_u *)_("is read-only (use ! to override)"); goto fail; } --- 2598,2604 ---- if (vim_strchr(p_cpo, CPO_FWRITE) != NULL) errmsg = (char_u *)_(err_readonly); else ! errmsg = (char_u *)_("is read-only (add ! to override)"); goto fail; } *************** *** 2899,2905 **** { if (buf_write_bytes(&write_info) == FAIL) { ! errmsg = (char_u *)_("Can't write to backup file (use ! to override)"); break; } ui_breakcheck(); --- 2900,2906 ---- { if (buf_write_bytes(&write_info) == FAIL) { ! errmsg = (char_u *)_("Can't write to backup file (add ! to override)"); break; } ui_breakcheck(); *************** *** 2911,2919 **** } if (close(bfd) < 0 && errmsg == NULL) ! errmsg = (char_u *)_("Close error for backup file (use ! to override)"); if (write_info.bw_len < 0) ! errmsg = (char_u *)_("Can't read file for backup (use ! to override)"); #ifdef UNIX set_file_time(backup, st_old.st_atime, st_old.st_mtime); #endif --- 2912,2920 ---- } if (close(bfd) < 0 && errmsg == NULL) ! errmsg = (char_u *)_("Close error for backup file (add ! to override)"); if (write_info.bw_len < 0) ! errmsg = (char_u *)_("Can't read file for backup (add ! to override)"); #ifdef UNIX set_file_time(backup, st_old.st_atime, st_old.st_mtime); #endif *************** *** 2929,2935 **** vim_free(copybuf); if (backup == NULL && errmsg == NULL) ! errmsg = (char_u *)_("Cannot create backup file (use ! to override)"); /* ignore errors when forceit is TRUE */ if ((some_error || errmsg != NULL) && !forceit) { --- 2930,2936 ---- vim_free(copybuf); if (backup == NULL && errmsg == NULL) ! errmsg = (char_u *)_("Cannot create backup file (add ! to override)"); /* ignore errors when forceit is TRUE */ if ((some_error || errmsg != NULL) && !forceit) { *************** *** 3031,3037 **** } if (backup == NULL && !forceit) { ! errmsg = (char_u *)_("Can't make backup file (use ! to override)"); goto fail; } } --- 3032,3038 ---- } if (backup == NULL && !forceit) { ! errmsg = (char_u *)_("Can't make backup file (add ! to override)"); goto fail; } } *************** *** 3093,3099 **** if (backup == NULL && overwriting && !append) if (mch_has_resource_fork(fname)) { ! errmsg = (char_u *)_("The resource fork will be lost (use ! to override)"); goto restore_backup; } #endif --- 3094,3100 ---- if (backup == NULL && overwriting && !append) if (mch_has_resource_fork(fname)) { ! errmsg = (char_u *)_("E460: The resource fork would be lost (add ! to override)"); goto restore_backup; } #endif *************** *** 3200,3206 **** { if (!forceit) { ! errmsg = (char_u *)_("E213: Cannot convert (use ! to write without conversion)"); goto restore_backup; } notconverted = TRUE; --- 3201,3207 ---- { if (!forceit) { ! errmsg = (char_u *)_("E213: Cannot convert (add ! to write without conversion)"); goto restore_backup; } notconverted = TRUE; *** ../vim61.210/src/globals.h Mon Sep 23 21:32:08 2002 --- src/globals.h Fri Sep 27 20:48:17 2002 *************** *** 1053,1059 **** EXTERN char_u e_cmdwin[] INIT(=N_("E11: Invalid in command-line window; executes, CTRL-C quits")); #endif EXTERN char_u e_curdir[] INIT(=N_("E12: Command not allowed from exrc/vimrc in current dir or tag search")); ! EXTERN char_u e_exists[] INIT(=N_("E13: File exists (use ! to override)")); EXTERN char_u e_failed[] INIT(=N_("Command failed")); EXTERN char_u e_internal[] INIT(=N_("Internal error")); EXTERN char_u e_interr[] INIT(=N_("Interrupted")); --- 1053,1059 ---- EXTERN char_u e_cmdwin[] INIT(=N_("E11: Invalid in command-line window; executes, CTRL-C quits")); #endif EXTERN char_u e_curdir[] INIT(=N_("E12: Command not allowed from exrc/vimrc in current dir or tag search")); ! EXTERN char_u e_exists[] INIT(=N_("E13: File exists (add ! to override)")); EXTERN char_u e_failed[] INIT(=N_("Command failed")); EXTERN char_u e_internal[] INIT(=N_("Internal error")); EXTERN char_u e_interr[] INIT(=N_("Interrupted")); *************** *** 1107,1113 **** EXTERN char_u e_notmp[] INIT(=N_("Can't get temp file name")); EXTERN char_u e_notopen[] INIT(=N_("Can't open file %s")); EXTERN char_u e_notread[] INIT(=N_("Can't read file %s")); ! EXTERN char_u e_nowrtmsg[] INIT(=N_("E37: No write since last change (use ! to override)")); EXTERN char_u e_null[] INIT(=N_("E38: Null argument")); #ifdef FEAT_DIGRAPHS EXTERN char_u e_number[] INIT(=N_("E39: Number expected")); --- 1107,1113 ---- EXTERN char_u e_notmp[] INIT(=N_("Can't get temp file name")); EXTERN char_u e_notopen[] INIT(=N_("Can't open file %s")); EXTERN char_u e_notread[] INIT(=N_("Can't read file %s")); ! EXTERN char_u e_nowrtmsg[] INIT(=N_("E37: No write since last change (add ! to override)")); EXTERN char_u e_null[] INIT(=N_("E38: Null argument")); #ifdef FEAT_DIGRAPHS EXTERN char_u e_number[] INIT(=N_("E39: Number expected")); *************** *** 1132,1138 **** #endif EXTERN char_u e_re_damg[] INIT(=N_("E43: Damaged match string")); EXTERN char_u e_re_corr[] INIT(=N_("E44: Corrupted regexp program")); ! EXTERN char_u e_readonly[] INIT(=N_("E45: 'readonly' option is set (use ! to override)")); #ifdef FEAT_EVAL EXTERN char_u e_readonlyvar[] INIT(=N_("E46: Cannot set read-only variable \"%s\"")); #endif --- 1132,1138 ---- #endif EXTERN char_u e_re_damg[] INIT(=N_("E43: Damaged match string")); EXTERN char_u e_re_corr[] INIT(=N_("E44: Corrupted regexp program")); ! EXTERN char_u e_readonly[] INIT(=N_("E45: 'readonly' option is set (add ! to override)")); #ifdef FEAT_EVAL EXTERN char_u e_readonlyvar[] INIT(=N_("E46: Cannot set read-only variable \"%s\"")); #endif *** ../vim61.210/src/version.c Mon Oct 7 20:09:28 2002 --- src/version.c Mon Oct 7 20:41:18 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 211, /**/ -- hundred-and-one symptoms of being an internet addict: 147. You finally give up smoking...because it made the monitor dirty. /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///