[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f3cdf9c 04/12: Remove compat code from some mml fil
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master f3cdf9c 04/12: Remove compat code from some mml files |
Date: |
Sun, 14 Feb 2016 04:17:23 +0000 |
branch: master
commit f3cdf9c23b79b242a6a313744686ed29cc16950b
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Remove compat code from some mml files
* lisp/gnus/mml-sec.el (mml-secure-passphrase-cache-expiry):
Remove compat code.
* lisp/gnus/mml-smime.el (mml-smime-openssl-sign-query):
Always use `mail-extract-address-components', since this isn't
time critical.
(mml-smime-get-dns-cert): Ditto.
* lisp/gnus/mml.el (mml-preview): Remove compat code.
---
lisp/gnus/mm-uu.el | 3 +--
lisp/gnus/mml-sec.el | 5 +----
lisp/gnus/mml-smime.el | 30 ++++++++++++------------------
lisp/gnus/mml.el | 11 +++++------
4 files changed, 19 insertions(+), 30 deletions(-)
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index fec3b29..049890e 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -290,8 +290,7 @@ If PROPERTIES is non-nil, PROPERTIES are applied to the
buffer,
see `set-text-properties'. If PROPERTIES equals t, this means to
apply the face `mm-uu-extract'."
(let ((obuf (current-buffer))
- (multi (and (boundp 'enable-multibyte-characters)
- enable-multibyte-characters))
+ (multi enable-multibyte-characters)
(coding-system buffer-file-coding-system))
(with-current-buffer (generate-new-buffer " *mm-uu*")
(if multi (mm-enable-multibyte) (mm-disable-multibyte))
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index bc7c0ac..576ecee 100644
--- a/lisp/gnus/mml-sec.el
+++ b/lisp/gnus/mml-sec.el
@@ -122,10 +122,7 @@ See Info node `(message) Security'."
:group 'message
:type 'boolean)
-(defcustom mml-secure-passphrase-cache-expiry
- (if (boundp 'password-cache-expiry)
- password-cache-expiry
- 16)
+(defcustom mml-secure-passphrase-cache-expiry password-cache-expiry
"How many seconds the passphrase is cached.
Whether the passphrase is cached at all is controlled by
`mml-secure-cache-passphrase'."
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index f7cf71a..02e602c 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -175,15 +175,12 @@ Whether the passphrase is cached at all is controlled by
(list 'keyfile
(if (= (length smime-keys) 1)
(cadar smime-keys)
- (or (let ((from (cadr (funcall (if (boundp
- 'gnus-extract-address-components)
- gnus-extract-address-components
- 'mail-extract-address-components)
- (or (save-excursion
- (save-restriction
- (message-narrow-to-headers)
- (message-fetch-field "from")))
- "")))))
+ (or (let ((from (cadr (mail-extract-address-components
+ (or (save-excursion
+ (save-restriction
+ (message-narrow-to-headers)
+ (message-fetch-field "from")))
+ "")))))
(and from (smime-get-key-by-email from)))
(smime-get-key-by-email
(gnus-completing-read "Sign this part with what signature"
@@ -204,15 +201,12 @@ Whether the passphrase is cached at all is controlled by
(while (not result)
(setq who (read-from-minibuffer
(format "%sLookup certificate for: " (or bad ""))
- (cadr (funcall (if (boundp
- 'gnus-extract-address-components)
- gnus-extract-address-components
- 'mail-extract-address-components)
- (or (save-excursion
- (save-restriction
- (message-narrow-to-headers)
- (message-fetch-field "to")))
- "")))))
+ (cadr (mail-extract-address-components
+ (or (save-excursion
+ (save-restriction
+ (message-narrow-to-headers)
+ (message-fetch-field "to")))
+ "")))))
(if (setq cert (smime-cert-by-dns who))
(setq result (list 'certfile (buffer-name cert)))
(setq bad (format-message "`%s' not found. " who))))
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index ce152ac..d9cf15f 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -1544,12 +1544,11 @@ or the `pop-to-buffer' function."
(message-sort-headers)
(mml-to-mime))
(if raw
- (when (fboundp 'set-buffer-multibyte)
- (let ((s (buffer-string)))
- ;; Insert the content into unibyte buffer.
- (erase-buffer)
- (mm-disable-multibyte)
- (insert s)))
+ (let ((s (buffer-string)))
+ ;; Insert the content into unibyte buffer.
+ (erase-buffer)
+ (mm-disable-multibyte)
+ (insert s))
(let ((gnus-newsgroup-charset (car message-posting-charset))
gnus-article-prepare-hook gnus-original-article-buffer
gnus-displaying-mime)
- [Emacs-diffs] master updated (8e14ce4 -> 598ff23), Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master b9baa80 01/12: Remove compat code and functions from message.el, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 014e0d1 02/12: Remove some compat code from mm-*.el, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 8f597e9 03/12: Remove compat code and compat functions from mm-util.el, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master f3cdf9c 04/12: Remove compat code from some mml files,
Lars Ingebrigtsen <=
- [Emacs-diffs] master 2366c70 05/12: Remove compat code in Gnus backends, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 374c21d 06/12: Remove compat function from pop3, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master c311723 07/12: Remove compat code from rfc2047, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master f322abc 08/12: Remove compat code from smiley, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 928bb3f 09/12: Remove compat functions from smime.el, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 19d298f 10/12: Remove compat functions from starttls.el, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 920414f 11/12: Remove compat code that relies on (featurep 'mule), Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 598ff23 12/12: Use open-network-stream instead of open-protocol-stream, Lars Ingebrigtsen, 2016/02/13