So8res wrote:

> 1. Add a function that returns the indent level that the user desires.
> (Basically exposes get_sw_value() to the user.)*
> 
> 2. Modify the existing ftplugins to use indent() instead of
> &shiftwidth. Should be pretty easy with awk,
> s/(&(?:sw|shiftwidth))/indent()/.
> 
> 3. Post a patch.
> 
> * We can either modify the indent() function to return the shift unit
> when given no params (patch below) or create a new function
> (shiftwidth()?). Thoughts?

I prefere a new function.  indent() returning two different things is
slightly confusing.

> Attached is a patch that implements the first option. I've done
> cursory tests but obviously not conclusive ones for all indent file
> changes. Should be pretty easy to implement a different option, for
> those who care a quick perl script to fix things up is:
> 
> ยป find runtime/ -type f | xargs perl -pi -e 
> 's/(&(sw|shiftwidth))/<FUNCTION_NAME>()/g'

The problem is not so much changing &sw to shiftwidth(), but getting all
maintainers to do this.


-- 
FROG: How you English say:  I one more time, mac, I unclog my nose towards
      you, sons of a window-dresser,  so, you think you could out-clever us
      French fellows with your silly knees-bent creeping about advancing
      behaviour.  (blows a raspberry) I wave my private parts at your aunties,
      you brightly-coloured, mealy-templed, cranberry-smelling, electric
      donkey-bottom biters.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Raspunde prin e-mail lui