Hi list.

The document of ":help!" says:

> :h[elp]! [subject]      Like ":help", but in non-English help files prefer to
>                         find a tag in a file with the same language as the
>                         current file.  See |help-translated|.

[subject] is omitable.  But, ":help!" makes E478.
I think ":help!" should open help.txt with the same language as the
current file.

I wrote a patch for this.

------------------------------------------------------------------------------
diff -r 2cfb68fa26cd src/ex_cmds.c
--- a/src/ex_cmds.c     Wed Mar 28 20:51:51 2012 +0200
+++ b/src/ex_cmds.c     Sun Apr 01 19:37:13 2012 +0900
@@ -5546,12 +5546,6 @@
        }
        arg = eap->arg;

-       if (eap->forceit && *arg == NUL)
-       {
-           EMSG(_("E478: Don't panic!"));
-           return;
-       }
-
        if (eap->skip)      /* not executing commands */
            return;
     }
------------------------------------------------------------------------------


Otherwise, the document should be fixed.

------------------------------------------------------------------------------
diff -r 2cfb68fa26cd runtime/doc/helphelp.txt
--- a/runtime/doc/helphelp.txt  Wed Mar 28 20:51:51 2012 +0200
+++ b/runtime/doc/helphelp.txt  Sun Apr 01 19:39:06 2012 +0900
@@ -92,7 +92,7 @@
                                :help so<C-V><CR>only
 <                      {not in Vi}

-:h[elp]! [subject]     Like ":help", but in non-English help files prefer to
+:h[elp]! {subject}     Like ":help", but in non-English help files prefer to
                        find a tag in a file with the same language as the
                        current file.  See |help-translated|.
------------------------------------------------------------------------------


Furthermore, as another proposal, :help behaves like this only when current
buffer is a help buffer.

------------------------------------------------------------------------------
diff -r 2cfb68fa26cd src/ex_cmds.c
--- a/src/ex_cmds.c     Wed Mar 28 20:51:51 2012 +0200
+++ b/src/ex_cmds.c     Sun Apr 01 19:41:19 2012 +0900
@@ -5546,7 +5546,7 @@
        }
        arg = eap->arg;

-       if (eap->forceit && *arg == NUL)
+       if (eap->forceit && *arg == NUL && !curbuf->b_help)
        {
            EMSG(_("E478: Don't panic!"));
            return;
------------------------------------------------------------------------------


Which do you like?

--
thinca <[email protected]>

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui