title: How to append multiple elements to a list in Emacs lisp
body: <p>In Emacs lisp there is <code>add-to-list</code> to add a single element to a list (if it doesn't exist already). </p>
  
  <p>Instead of one, I want to add multiple elements. Also, I do not want to filter duplicate elements but add them to the list nonetheless.</p>
  
  <p>Currently, I have implemented the following function:</p>
  
  <pre><code>(defun append-to-list (list-var elements)
    "Append ELEMENTS to the end of LIST-VAR.
  
  The return value is the new value of LIST-VAR."
    (set list-var (append (symbol-value list-var) elements)))
  </code></pre>
  
  <p>The function does what I want but I was wondering if something like this (or better) already exists in Emacs lisp. I don't want to reinvent the wheel.</p>
  
  <p><strong>Update 1</strong>: Stefan points out below that this code does not work with lexical scoping. Is there a way to make it work?</p>
  
  <p><strong>Update 2</strong>: Previously I thought that duplicate filtering would be fine but it's not. I do need the duplicates.</p>