title: Creating a elisp function to convert URL to HTML link?
body: <p>I'd like to create some sort of elisp function and bind it to a key that takes a URL, in one of two formats, and generate an HTML link element.</p>
  
  <p>Here are the two input formats:</p>
  
  <pre><code>http://developer.apple.com/safaridemos/
  http://developer.apple.com/safaridemos|Safari Demos
  </code></pre>
  
  <p>Here are the two desired output values:</p>
  
  <pre><code>&lt;a href="http://developer.apple.com/safaridemos/"&gt;safaridemos&lt;/a&gt;
  &lt;a href="http://developer.apple.com/safaridemos/"&gt;Safari Demos&lt;/a&gt;
  </code></pre>
  
  <p>Ideally, this would work on a region, but even if it only worked on one line, it would be helpful.</p>