title: Multiple error messages in vim message history
body: <p>I am trying to maintain an error message chain by passing start-up time errors to vim's error control system. For that I have the following function in my .vimrc:</p>
  
  <pre><code>" Local error message function
  function! LocalError(err)
      " Update the errorMessageString
      let g:errorMessageString = a:err
      autocmd VimEnter * echohl ErrorMsg | echomsg g:errorMessageString | echohl None
  endfunction
  </code></pre>
  
  <p>So this function is accessible down the stream, by any other scripts that are being sourced. So each one of those calls this function with a slightly different message string.</p>
  
  <p>However once I display those in vim with the :messages command I able to see the multiple lines of message strings but all of them are identical.</p>
  
  <p>As if the message buffer is always being overwritten by the last string that has been provided to the function. What I am doing wrong?</p>
  
  <p>Here is what it should look like:</p>
  
  <pre><code>&lt;banana&gt; (SEVERE_ERROR): Unable to access.
  &lt;foo&gt;    (SEVERE_ERROR): Unable to access.
  </code></pre>
  
  <p>However it looks like this:</p>
  
  <pre><code>&lt;foo&gt;    (SEVERE_ERROR): Unable to access.
  &lt;foo&gt;    (SEVERE_ERROR): Unable to access.
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks.</p>