runtime(doc): Add environment variable expansion note to options

Commit: 
https://github.com/vim/vim/commit/2190036c8cfb1e94625756b8ffbb3aa65f04687e
Author: Alex Plate <[email protected]>
Date:   Sun Nov 23 19:30:19 2025 +0000

    runtime(doc): Add environment variable expansion note to options
    
    Add "Environment variables are expanded |:set_env|" documentation to
    options that have the P_EXPAND flag but were missing this note.
    
    Updated options:
    - 'cdpath'
    - 'dictionary'
    - 'mkspellmem'
    - 'packpath'
    - 'runtimepath'
    - 'spellfile'
    - 'spellsuggest'
    - 'thesaurus'
    - 'ttytype'
    - 'undodir'
    - 'verbosefile'
    - 'viewdir'
    - 'viminfofile'
    
    These options support environment variable expansion in their values
    (e.g., $HOME, $USER) but the documentation didn't explicitly mention
    this capability. This brings their documentation in line with other
    options like backupdir, directory, and makeprg that already include
    this note.
    
    closes: #18791
    
    Signed-off-by: Alex Plate <[email protected]>
    Signed-off-by: Doug Kearns <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 9b2169e33..f8c9843e4 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 9.1.  Last change: 2025 Nov 20
+*options.txt*  For Vim version 9.1.  Last change: 2025 Nov 23
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1670,7 +1670,8 @@ A jump table for the options with a short description can 
be found at |Q_op|.
        a modified version of the following command in your vimrc file to
        override it: >
          :let &cdpath = ',' .. substitute(substitute($CDPATH, '[, ]', '\
-<      This option cannot be set from a |modeline| or in the |sandbox|, for
+<      Environment variables are expanded |:set_env|.
+       This option cannot be set from a |modeline| or in the |sandbox|, for
        security reasons.
        (parts of 'cdpath' can be passed to the shell to expand file names).
 
@@ -3064,6 +3065,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
        To include a comma in a file name precede it with a backslash.  Spaces
        after a comma are ignored, otherwise spaces are included in the file
        name.  See |option-backslash| about using backslashes.
+       Environment variables are expanded |:set_env|.
        This has nothing to do with the |Dictionary| variable type.
        Where to find a list of words?
        - On FreeBSD, there is the file "/usr/share/dict/words".
@@ -6116,7 +6118,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
                :set mkspellmem=900000,3000,800
 <      If you have less than 512 Mbyte |:mkspell| may fail for some
        languages, no matter what you set 'mkspellmem' to.
-
+       Environment variables are expanded |:set_env|.
        This option cannot be set from a |modeline| or in the |sandbox|, for
        security reasons.
 
@@ -6539,6 +6541,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
                                *'packpath'* *'pp'*
 'packpath' 'pp'                string  (default: see 'runtimepath')
        Directories used to find packages.  See |packages|.
+       Environment variables are expanded |:set_env|.
        This option cannot be set from a |modeline| or in the |sandbox|, for
        security reasons.
 
@@ -7363,6 +7366,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
        runtime files.
        When Vim is started with |--clean| the home directory entries are not
        included.
+       Environment variables are expanded |:set_env|.
        This option cannot be set from a |modeline| or in the |sandbox|, for
        security reasons.
 
@@ -8195,6 +8199,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
        name if you want to.  However, it will then only be used when
        'spellfile' is set to it, for entries in 'spelllang' only files
        without region name will be found.
+       Environment variables are expanded |:set_env|.
        This option cannot be set from a |modeline| or in the |sandbox|, for
        security reasons.
 
@@ -8322,7 +8327,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
        Only one of "best", "double" or "fast" may be used.  The others may
        appear several times in any order.  Example: >
                :set sps=file:~/.vim/sugg,best,expr:MySuggest()
-<
+<      Environment variables are expanded |:set_env|.
        This option cannot be set from a |modeline| or in the |sandbox|, for
        security reasons.
 
@@ -9159,8 +9164,9 @@ A jump table for the options with a short description can 
be found at |Q_op|.
        name.  See |option-backslash| about using backslashes.  The use of
        |:set+=| and |:set-=| is preferred when adding or removing directories
        from the list.  This avoids problems when a future version uses
-       another default.  Backticks cannot be used in this option for security
-       reasons.
+       another default.
+       Environment variables are expanded |:set_env|.
+       Backticks cannot be used in this option for security reasons.
 
                                                *'thesaurusfunc'* *'tsrfu'*
 'thesaurusfunc' 'tsrfu'        string  (default: empty)
@@ -9488,6 +9494,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
 'ttytype' 'tty'                string  (default from $TERM)
                        global
        Alias for 'term', see above.
+       Environment variables are expanded |:set_env|.
 
                                                *'undodir'* *'udir'*
 'undodir' 'udir'       string  (default ".")
@@ -9505,6 +9512,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
        undo file that exists is used.  When it cannot be read an error is
        given, no further entry is used.
        See |undo-persistence|.
+       Environment variables are expanded |:set_env|.
        This option cannot be set from a |modeline| or in the |sandbox|, for
        security reasons.
 
@@ -9656,6 +9664,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
        Setting 'verbosefile' to a new value is like making it empty first.
        The difference with |:redir| is that verbose messages are not
        displayed when 'verbosefile' is set.
+       Environment variables are expanded |:set_env|.
        This option cannot be set from a |modeline| or in the |sandbox|, for
        security reasons.
 
@@ -9670,6 +9679,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
                        feature}
        Name of the directory where to store files for |:mkview|.
        For $XDG_CONFIG_HOME see |xdg-base-dir|.
+       Environment variables are expanded |:set_env|.
        This option cannot be set from a |modeline| or in the |sandbox|, for
        security reasons.
 
@@ -9825,6 +9835,7 @@ A jump table for the options with a short description can 
be found at |Q_op|.
        When equal to "NONE" no viminfo file will be read or written.
        This option can be set with the |-i| command line flag.  The |--clean|
        command line flag sets it to "NONE".
+       Environment variables are expanded |:set_env|.
        This option cannot be set from a |modeline| or in the |sandbox|, for
        security reasons.
 

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vNG1A-000FrO-76%40256bit.org.

Raspunde prin e-mail lui