]> code.delx.au - gnu-emacs/blobdiff - lisp/url/url-mailto.el
(url-mailto): Insert body after mail-header-separator if present, so
[gnu-emacs] / lisp / url / url-mailto.el
index d9d6e22cd05333a9943e570cf70bb514b978eebe..6585ba8e4581dd2a31805e89f4a10b153d6738df 100644 (file)
@@ -1,7 +1,7 @@
 ;;; url-mail.el --- Mail Uniform Resource Locator retrieval code
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2004,
-;;   2005, 2006 Free Software Foundation, Inc.
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Keywords: comm, data, processes
 
     (while args
       (if (string= (caar args) "body")
          (progn
-           (goto-char (point-max))
+           (goto-char (point-min))
+           (or (search-forward (concat "\n" mail-header-separator "\n") nil t)
+               (goto-char (point-max)))
            (insert (mapconcat 
                     #'(lambda (string)
                         (replace-regexp-in-string "\r\n" "\n" string))