Am 08.05.2017 um 12:53 schrieb Bram Moolenaar:
For flexibility this needs to work recursively. We could do something
like:
let saved_options = options_save()
... do your stuff ...
call options_restore(saved_options)
The options being saved should be small to keep this efficient. We need
to make a list of the ones that are useful, such as 'ignorecase' and
'gdefault'.
What about a different approach:
Have a mode (for debugging only) in which builtin commands and functions
complain when options they use are not at the default value.
This way the script writer learns which options need to be set and restored.
(maybe: When used at toplevel (at the cmdline) there is no warning)
The advantage is that exactly the required options are set and restored.
And I'm not sure if the "last set from" info would work after options_save().
--
Andy
--
--
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].
For more options, visit https://groups.google.com/d/optout.