(autoload 'message-fetch-field "message")
(autoload 'message-mark-active-p "message")
(autoload 'fill-flowed-encode "flow-fill")
- (autoload 'message-posting-charset "message")
- (autoload 'x-dnd-get-local-file-name "x-dnd"))
+ (autoload 'message-posting-charset "message"))
+
+(eval-when-compile
+ (autoload 'dnd-get-local-file-name "dnd"))
(defcustom mml-content-type-parameters
'(name access-type expiration size permission format)
"*A list of acceptable parameters in MML tag.
These parameters are generated in Content-Type header if exists."
- :version "21.4"
+ :version "22.1"
:type '(repeat (symbol :tag "Parameter"))
:group 'message)
'(filename creation-date modification-date read-date)
"*A list of acceptable parameters in MML tag.
These parameters are generated in Content-Disposition header if exists."
- :version "21.4"
+ :version "22.1"
:type '(repeat (symbol :tag "Parameter"))
:group 'message)
(defcustom mml-insert-mime-headers-always nil
"If non-nil, always put Content-Type: text/plain at top of empty parts.
It is necessary to work against a bug in certain clients."
- :version "21.4"
+ :version "22.1"
:type 'boolean
:group 'message)
;; included in the message
(let* (secure-mode
(taginfo (mml-read-tag))
+ (keyfile (cdr (assq 'keyfile taginfo)))
+ (certfile (cdr (assq 'certfile taginfo)))
(recipients (cdr (assq 'recipients taginfo)))
(sender (cdr (assq 'sender taginfo)))
(location (cdr (assq 'tag-location taginfo)))
(setq tags (list "sign" method "encrypt" method))))
(eval `(mml-insert-tag ,secure-mode
,@tags
+ ,(if keyfile "keyfile")
+ ,keyfile
+ ,(if certfile "certfile")
+ ,certfile
,(if recipients "recipients")
,recipients
,(if sender "sender")
;; First decode the head.
(save-restriction
(message-narrow-to-head)
- (mail-decode-encoded-word-region (point-min) (point-max)))
+ (let ((rfc2047-quote-decoded-words-containing-tspecials t))
+ (mail-decode-encoded-word-region (point-min) (point-max))))
(unless handles
(setq handles (mm-dissect-buffer t)))
(goto-char (point-min))
(> (prefix-numeric-value arg) 0)))
(add-minor-mode 'mml-mode " MML" mml-mode-map)
(easy-menu-add mml-menu mml-mode-map)
- (when (boundp 'x-dnd-protocol-alist)
- (set (make-local-variable 'x-dnd-protocol-alist)
- '(("^file:///" . mml-x-dnd-attach-file)
- ("^file://" . x-dnd-open-file)
- ("^file:" . mml-x-dnd-attach-file))))
+ (when (boundp 'dnd-protocol-alist)
+ (set (make-local-variable 'dnd-protocol-alist)
+ '(("^file:///" . mml-dnd-attach-file)
+ ("^file://" . dnd-open-file)
+ ("^file:" . mml-dnd-attach-file))))
(run-hooks 'mml-mode-hook)))
;;;
'disposition (or disposition "attachment")
'description description))
-(defun mml-x-dnd-attach-file (uri action)
+(defun mml-dnd-attach-file (uri action)
"Attach a drag and drop file."
- (let ((file (x-dnd-get-local-file-name uri t)))
+ (let ((file (dnd-get-local-file-name uri t)))
(when (and file (file-regular-p file))
(let* ((type (mml-minibuffer-read-type file))
(description (mml-minibuffer-read-description))
(goto-char (point-min))))
(if (and (boundp 'gnus-buffer-configuration)
(assq 'mml-preview gnus-buffer-configuration))
- (gnus-configure-windows 'mml-preview)
+ (let ((gnus-message-buffer (current-buffer)))
+ (gnus-configure-windows 'mml-preview))
(pop-to-buffer mml-preview-buffer)))
(defun mml-validate ()