aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-14 14:42:26 +1100
committerLars Ingebrigtsen2016-02-14 14:42:26 +1100
commitf3cdf9c23b79b242a6a313744686ed29cc16950b (patch)
treeccdd7c700f264b4017d82cfbd2bcabf2d8ad7f66
parent8f597e90f6c7b1f1cae0096f66a335df01b0e6f9 (diff)
downloademacs-f3cdf9c23b79b242a6a313744686ed29cc16950b.tar.gz
emacs-f3cdf9c23b79b242a6a313744686ed29cc16950b.zip
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.
-rw-r--r--lisp/gnus/mm-uu.el3
-rw-r--r--lisp/gnus/mml-sec.el5
-rw-r--r--lisp/gnus/mml-smime.el30
-rw-r--r--lisp/gnus/mml.el11
4 files changed, 19 insertions, 30 deletions
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index fec3b299407..049890e2e30 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,
290see `set-text-properties'. If PROPERTIES equals t, this means to 290see `set-text-properties'. If PROPERTIES equals t, this means to
291apply the face `mm-uu-extract'." 291apply the face `mm-uu-extract'."
292 (let ((obuf (current-buffer)) 292 (let ((obuf (current-buffer))
293 (multi (and (boundp 'enable-multibyte-characters) 293 (multi enable-multibyte-characters)
294 enable-multibyte-characters))
295 (coding-system buffer-file-coding-system)) 294 (coding-system buffer-file-coding-system))
296 (with-current-buffer (generate-new-buffer " *mm-uu*") 295 (with-current-buffer (generate-new-buffer " *mm-uu*")
297 (if multi (mm-enable-multibyte) (mm-disable-multibyte)) 296 (if multi (mm-enable-multibyte) (mm-disable-multibyte))
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index bc7c0ac5210..576eceecf4b 100644
--- a/lisp/gnus/mml-sec.el
+++ b/lisp/gnus/mml-sec.el
@@ -122,10 +122,7 @@ See Info node `(message) Security'."
122 :group 'message 122 :group 'message
123 :type 'boolean) 123 :type 'boolean)
124 124
125(defcustom mml-secure-passphrase-cache-expiry 125(defcustom mml-secure-passphrase-cache-expiry password-cache-expiry
126 (if (boundp 'password-cache-expiry)
127 password-cache-expiry
128 16)
129 "How many seconds the passphrase is cached. 126 "How many seconds the passphrase is cached.
130Whether the passphrase is cached at all is controlled by 127Whether the passphrase is cached at all is controlled by
131`mml-secure-cache-passphrase'." 128`mml-secure-cache-passphrase'."
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index f7cf71adf62..02e602ce77f 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
175 (list 'keyfile 175 (list 'keyfile
176 (if (= (length smime-keys) 1) 176 (if (= (length smime-keys) 1)
177 (cadar smime-keys) 177 (cadar smime-keys)
178 (or (let ((from (cadr (funcall (if (boundp 178 (or (let ((from (cadr (mail-extract-address-components
179 'gnus-extract-address-components) 179 (or (save-excursion
180 gnus-extract-address-components 180 (save-restriction
181 'mail-extract-address-components) 181 (message-narrow-to-headers)
182 (or (save-excursion 182 (message-fetch-field "from")))
183 (save-restriction 183 "")))))
184 (message-narrow-to-headers)
185 (message-fetch-field "from")))
186 "")))))
187 (and from (smime-get-key-by-email from))) 184 (and from (smime-get-key-by-email from)))
188 (smime-get-key-by-email 185 (smime-get-key-by-email
189 (gnus-completing-read "Sign this part with what signature" 186 (gnus-completing-read "Sign this part with what signature"
@@ -204,15 +201,12 @@ Whether the passphrase is cached at all is controlled by
204 (while (not result) 201 (while (not result)
205 (setq who (read-from-minibuffer 202 (setq who (read-from-minibuffer
206 (format "%sLookup certificate for: " (or bad "")) 203 (format "%sLookup certificate for: " (or bad ""))
207 (cadr (funcall (if (boundp 204 (cadr (mail-extract-address-components
208 'gnus-extract-address-components) 205 (or (save-excursion
209 gnus-extract-address-components 206 (save-restriction
210 'mail-extract-address-components) 207 (message-narrow-to-headers)
211 (or (save-excursion 208 (message-fetch-field "to")))
212 (save-restriction 209 "")))))
213 (message-narrow-to-headers)
214 (message-fetch-field "to")))
215 "")))))
216 (if (setq cert (smime-cert-by-dns who)) 210 (if (setq cert (smime-cert-by-dns who))
217 (setq result (list 'certfile (buffer-name cert))) 211 (setq result (list 'certfile (buffer-name cert)))
218 (setq bad (format-message "`%s' not found. " who)))) 212 (setq bad (format-message "`%s' not found. " who))))
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index ce152acf145..d9cf15f4970 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -1544,12 +1544,11 @@ or the `pop-to-buffer' function."
1544 (message-sort-headers) 1544 (message-sort-headers)
1545 (mml-to-mime)) 1545 (mml-to-mime))
1546 (if raw 1546 (if raw
1547 (when (fboundp 'set-buffer-multibyte) 1547 (let ((s (buffer-string)))
1548 (let ((s (buffer-string))) 1548 ;; Insert the content into unibyte buffer.
1549 ;; Insert the content into unibyte buffer. 1549 (erase-buffer)
1550 (erase-buffer) 1550 (mm-disable-multibyte)
1551 (mm-disable-multibyte) 1551 (insert s))
1552 (insert s)))
1553 (let ((gnus-newsgroup-charset (car message-posting-charset)) 1552 (let ((gnus-newsgroup-charset (car message-posting-charset))
1554 gnus-article-prepare-hook gnus-original-article-buffer 1553 gnus-article-prepare-hook gnus-original-article-buffer
1555 gnus-displaying-mime) 1554 gnus-displaying-mime)