Mercurial > vim
comparison src/structs.h @ 27043:15f40772e10a v8.2.4050
patch 8.2.4050: Vim9: need to prefix every item in an autoload script
Commit: https://github.com/vim/vim/commit/dc4451df61a6aa12a0661817b7094fb32f09e11d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 9 21:36:37 2022 +0000
patch 8.2.4050: Vim9: need to prefix every item in an autoload script
Problem: Vim9: need to prefix every item in an autoload script.
Solution: First step in supporting "vim9script autoload" and "import
autoload".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 09 Jan 2022 22:45:04 +0100 |
parents | b0ef52086d57 |
children | 140102677c12 |
comparison
equal
deleted
inserted
replaced
27042:8fc14d120630 | 27043:15f40772e10a |
---|---|
1825 scid_T imp_sid; // script ID of "from" | 1825 scid_T imp_sid; // script ID of "from" |
1826 int imp_flags; // IMP_FLAGS_ values | 1826 int imp_flags; // IMP_FLAGS_ values |
1827 } imported_T; | 1827 } imported_T; |
1828 | 1828 |
1829 #define IMP_FLAGS_RELOAD 2 // script reloaded, OK to redefine | 1829 #define IMP_FLAGS_RELOAD 2 // script reloaded, OK to redefine |
1830 #define IMP_FLAGS_AUTOLOAD 4 // script still needs to be loaded | |
1830 | 1831 |
1831 /* | 1832 /* |
1832 * Info about an already sourced scripts. | 1833 * Info about an already sourced scripts. |
1833 */ | 1834 */ |
1834 typedef struct | 1835 typedef struct |
1861 | 1862 |
1862 int sn_version; // :scriptversion | 1863 int sn_version; // :scriptversion |
1863 int sn_state; // SN_STATE_ values | 1864 int sn_state; // SN_STATE_ values |
1864 char_u *sn_save_cpo; // 'cpo' value when :vim9script found | 1865 char_u *sn_save_cpo; // 'cpo' value when :vim9script found |
1865 char sn_is_vimrc; // .vimrc file, do not restore 'cpo' | 1866 char sn_is_vimrc; // .vimrc file, do not restore 'cpo' |
1867 char sn_is_autoload; // "vim9script autoload" | |
1866 | 1868 |
1867 # ifdef FEAT_PROFILE | 1869 # ifdef FEAT_PROFILE |
1868 int sn_prof_on; // TRUE when script is/was profiled | 1870 int sn_prof_on; // TRUE when script is/was profiled |
1869 int sn_pr_force; // forceit: profile functions in this script | 1871 int sn_pr_force; // forceit: profile functions in this script |
1870 proftime_T sn_pr_child; // time set when going into first child | 1872 proftime_T sn_pr_child; // time set when going into first child |
1884 int sn_prl_execed; // line being timed was executed | 1886 int sn_prl_execed; // line being timed was executed |
1885 # endif | 1887 # endif |
1886 } scriptitem_T; | 1888 } scriptitem_T; |
1887 | 1889 |
1888 #define SN_STATE_NEW 0 // newly loaded script, nothing done | 1890 #define SN_STATE_NEW 0 // newly loaded script, nothing done |
1889 #define SN_STATE_RELOAD 1 // script loaded before, nothing done | 1891 #define SN_STATE_NOT_LOADED 1 // script located but not loaded |
1892 #define SN_STATE_RELOAD 2 // script loaded before, nothing done | |
1890 #define SN_STATE_HAD_COMMAND 9 // a command was executed | 1893 #define SN_STATE_HAD_COMMAND 9 // a command was executed |
1891 | 1894 |
1892 // Struct passed through eval() functions. | 1895 // Struct passed through eval() functions. |
1893 // See EVALARG_EVALUATE for a fixed value with eval_flags set to EVAL_EVALUATE. | 1896 // See EVALARG_EVALUATE for a fixed value with eval_flags set to EVAL_EVALUATE. |
1894 typedef struct { | 1897 typedef struct { |