title: Help with an interactive Emacs Lisp function for replacing text
body: <p>I've been using Emacs for a couple months now, and I want to get started in elisp programming. Specifically, I'd like to write my own <code>interactive</code> function. However, I'm more than a bit lost. <code>(interactive ...)</code> has tons of options and I'm not sure which one I want. Then, I don't really know the names of the functions I need. If someone could kindly help me turn my pseudocode into real code, I would be mighty appreciative! (And as always, any links to informative places would be good. Right now I've just been reading <a href="http://www.rattlesnake.com/intro/index.html" rel="nofollow noreferrer">this.</a>)</p>
  
  <p>Here is pseudocode for what I'd like to do:</p>
  
  <pre><code>(defun my-func (buffer) ; I think I need the buffer as an arg?
    "does some replacements"
    (interactive ???) ; ?
    (let (replacements (list
     '("a-regexp-string" . "a-replacement-string-with-backreferences")
     ...)) ; more of the above
      (while replacements
        (let (current (car replacements)) ; get a regexp-replacement pair
          (some-regexp-replace-func buffer (car current) (cdr current)) ; do the replacement
          (setq replacements (cdr replacements))))))
  </code></pre>