Gary Johnson wrote:

> On 2011-09-07, Gary Johnson wrote:
> > On 2011-09-07, James Vega wrote:
> > > On Wed, Sep 07, 2011 at 02:16:59PM -0700, Gary Johnson wrote:
> > > > When a buffer is modified by a BufRead autocommand or by a filetype
> > > > plugin, 'modified' is not set.
> > > 
> > > This is documented in the text below ":help gzip-example".
> > > 
> > >   The commands executed for the BufNewFile, BufRead/BufReadPost,
> > >   BufWritePost, FileAppendPost and VimLeave events do not set or reset
> > >   the changed flag of the buffer. ... If you do want the buffer to be
> > >   marked as modified, set the 'modified' option.
> > 
> > Odd.  I would think it would be the other way around:  If an
> > autocommand modifies a buffer and you don't want it marked as
> > modified, set the 'nomodified' option.  That would follow the
> > principle of least surprise.
> > 
> > I didn't think to look under ":help gzip-example" but I did read
> > ":help 'modified'" a couple of times.
> > 
> > I think ":help 'modified'" should include an additional paragraph
> > after item 2:
> > 
> >     This option is not set when a change is made as the result of a
> >     BufNewFile, BufRead/BufReadPost, BufWritePost, FileAppendPost or
> >     VimLeave autocommand event.
> > 
> > Thanks for the explanation and the pointer.
> 
> Here's a patch to options.txt that adds a paragraph explaining when
> 'modified' is not set.

Thanks, I'll include it.

-- 
Female engineers become irresistible at the age of consent and remain that
way until about thirty minutes after their clinical death.  Longer if it's a
warm day.
                                (Scott Adams - The Dilbert principle)

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