diff options
| author | rhysd <lin90162@yahoo.co.jp> | 2019-06-23 21:04:51 +0900 |
|---|---|---|
| committer | rhysd <lin90162@yahoo.co.jp> | 2019-06-24 09:31:30 +0900 |
| commit | 3d5a800278aacce3cf332e2e416975905881b8f6 (patch) | |
| tree | a09e8d5d280bff12f1e363bba8d5bd442ac3c9fd /runtime | |
| parent | bd0615590b901b99e8cce3c5e52c83af69649cd5 (diff) | |
| download | rneovim-3d5a800278aacce3cf332e2e416975905881b8f6.tar.gz rneovim-3d5a800278aacce3cf332e2e416975905881b8f6.tar.bz2 rneovim-3d5a800278aacce3cf332e2e416975905881b8f6.zip | |
vim-patch:8.1.1554: docs and tests for :const can be improved
Problem: Docs and tests for :const can be improved.
Solution: Improve documentation, add a few more tests. (Ryuichi Hayashida,
closes vim/vim#4551)
https://github.com/vim/vim/commit/1c196e7b1742c1a50ce0d74190721acaad087f81
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/doc/eval.txt | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 6649bebedb..a17808e298 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -9631,15 +9631,10 @@ This does NOT work: > If the system does not support deleting an environment variable, it is made empty. - *:cons* *:const* *E996* + *:cons* *:const* :cons[t] {var-name} = {expr1} :cons[t] [{name1}, {name2}, ...] = {expr1} -:cons[t] [{name1}, {name2}, ...] .= {expr1} :cons[t] [{name}, ..., ; {lastname}] = {expr1} -:cons[t] {var-name} =<< [trim] {marker} -text... -text... -{marker} Similar to |:let|, but additionally lock the variable after setting the value. This is the same as locking the variable with |:lockvar| just after |:let|, thus: > @@ -9653,7 +9648,11 @@ text... |:const| does not allow to for changing a variable. > :let x = 1 :const x = 2 " Error! -< +< *E996* + Note that environment variables, option values and + register values cannot be used here, since they cannot + be locked. + :lockv[ar][!] [depth] {name} ... *:lockvar* *:lockv* Lock the internal variable {name}. Locking means that it can no longer be changed (until it is unlocked). |