lisp/ChangeLog: Fix date
[gnus] / lisp / mml.el
index e38cfcf..5754475 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mml.el --- A package for parsing and validating MML documents
 
-;; Copyright (C) 1998-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2015 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; This file is part of GNU Emacs.
@@ -28,6 +28,7 @@
 (require 'mm-decode)
 (require 'mml-sec)
 (eval-when-compile (require 'cl))
+(eval-when-compile (require 'url))
 (eval-when-compile
   (when (featurep 'xemacs)
     (require 'easy-mmode))) ; for `define-minor-mode'
@@ -256,7 +257,9 @@ part.  This is for the internal use, you should never modify the value.")
                ((string= mode "encrypt")
                 (setq tags (list "encrypt" method)))
                ((string= mode "signencrypt")
-                (setq tags (list "sign" method "encrypt" method))))
+                (setq tags (list "sign" method "encrypt" method)))
+               (t
+                (error "Unknown secure mode %s" mode)))
          (eval `(mml-insert-tag ,secure-mode
                                 ,@tags
                                 ,(if keyfile "keyfile")
@@ -459,6 +462,9 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
 (defvar mml-multipart-number 0)
 (defvar mml-inhibit-compute-boundary nil)
 
+(declare-function libxml-parse-html-region "xml.c"
+                 (start end &optional base-url discard-comments))
+
 (defun mml-generate-mime (&optional multipart-type)
   "Generate a MIME message based on the current MML document.
 MULTIPART-TYPE defaults to \"mixed\", but can also
@@ -470,6 +476,7 @@ be \"related\" or \"alternate\"."
        nil
       (when (and (consp (car cont))
                 (= (length cont) 1)
+                (fboundp 'libxml-parse-html-region)
                 (equal (cdr (assq 'type (car cont))) "text/html"))
        (setq cont (mml-expand-html-into-multipart-related (car cont))))
       (prog1