]> code.delx.au - gnu-emacs/commitdiff
(url-mailto): Insert body after mail-header-separator if present, so
authorChong Yidong <cyd@stupidchicken.com>
Tue, 29 May 2007 15:31:08 +0000 (15:31 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 29 May 2007 15:31:08 +0000 (15:31 +0000)
that is is before signature.  Suggested by Leo Liu <sdl.web@gmail.com>.

lisp/url/url-mailto.el

index 9f20989a0b18a6c943b9132fdc52a10e4af1c214..6585ba8e4581dd2a31805e89f4a10b153d6738df 100644 (file)
     (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))