Skip to content

Commit 08452c6

Browse files
authored
Merge pull request #1199 from tsuyoshicho/update/20221125/eval
Update eval.{txt,jax}
2 parents a81da60 + 718e61d commit 08452c6

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

doc/eval.jax

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim バージョン 9.0. Last change: 2022 Oct 07
1+
*eval.txt* For Vim バージョン 9.0. Last change: 2022 Nov 22
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -1505,7 +1505,7 @@ Note シングルクォートが使われていることに注意。
15051505
if a =~ '\s*'
15061506
15071507
1508-
文字列補間 *$quote* *interp-string*
1508+
文字列補間 *$quote* *interpolated-string*
15091509
----------
15101510
$"string" 補間された文字列定数 *expr-$quote*
15111511
$'string' 補間されたリテラル文字列定数 *expr-$'*
@@ -2781,8 +2781,8 @@ text...
27812781
|literal-string| として扱われるが、シングルクォートは
27822782
除外され2重にする必要はない。
27832783
"eval" が指定されている場合、{expr} 形式の任意の Vim
2784-
の式が評価され、結果が |interp-string| のように式を置
2785-
き換える
2784+
の式が評価され、結果が |interpolated-string| のように
2785+
式を置き換える
27862786
例として $HOME を展開する: >
27872787
let lines =<< trim eval END
27882788
some text
@@ -2989,6 +2989,10 @@ text...
29892989
:unlo[ckvar][!] [depth] {name} ... *:unlockvar* *:unlo* *E1246*
29902990
内部変数{name}をアンロックする。|:lockvar|の逆を行う。
29912991

2992+
{name} が存在しない場合:
2993+
- |Vim9| script ではエラーになる。
2994+
- 旧来のスクリプトでは黙って無視される。
2995+
29922996
:if {expr1} *:if* *:end* *:endif* *:en* *E171* *E579* *E580*
29932997
:en[dif] {expr1}が非ゼロと評価された場合に、対応する `:else`
29942998
`:endif` までの命令を実行する。

en/eval.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 9.0. Last change: 2022 Oct 07
1+
*eval.txt* For Vim version 9.0. Last change: 2022 Nov 22
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1548,7 +1548,7 @@ to be doubled. These two commands are equivalent: >
15481548
if a =~ '\s*'
15491549
15501550
1551-
interpolated-string *$quote* *interp-string*
1551+
interpolated-string *$quote* *interpolated-string*
15521552
--------------------
15531553
$"string" interpolated string constant *expr-$quote*
15541554
$'string' interpolated literal string constant *expr-$'*
@@ -2859,7 +2859,7 @@ text...
28592859
does not need to be doubled.
28602860
If "eval" is specified, then any Vim expression in the
28612861
form {expr} is evaluated and the result replaces the
2862-
expression, like with |interp-string|.
2862+
expression, like with |interpolated-string|.
28632863
Example where $HOME is expanded: >
28642864
let lines =<< trim eval END
28652865
some text
@@ -3073,6 +3073,10 @@ text...
30733073
Unlock the internal variable {name}. Does the
30743074
opposite of |:lockvar|.
30753075

3076+
If {name} does not exist:
3077+
- In |Vim9| script an error is given.
3078+
- In legacy script this is silently ignored.
3079+
30763080
:if {expr1} *:if* *:end* *:endif* *:en* *E171* *E579* *E580*
30773081
:en[dif] Execute the commands until the next matching `:else`
30783082
or `:endif` if {expr1} evaluates to non-zero.

0 commit comments

Comments
 (0)