]> code.delx.au - gnu-emacs/commitdiff
Remove compat code from some mml files
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 14 Feb 2016 03:42:26 +0000 (14:42 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 14 Feb 2016 03:42:26 +0000 (14:42 +1100)
* 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
lisp/gnus/mml-sec.el
lisp/gnus/mml-smime.el
lisp/gnus/mml.el

index fec3b299407a1338d7d888aa07a0743d13598b07..049890e2e30a4a1b070be1acc9b5ff57e0cb5c91 100644 (file)
@@ -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))
index bc7c0ac52107991631b49630cafdb51cf689efdc..576eceecf4bc2945b6586007720a9cfadd827399 100644 (file)
@@ -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'."
index f7cf71adf62538b89b0b0c1e97ad81b01f307ad4..02e602ce77fc133822ec80462e280e2fff7e8e6b 100644 (file)
@@ -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))))
index ce152acf145188c5e520aa4c5d9c7348e1f5d742..d9cf15f49703886a0a5bcb06440b48394111b389 100644 (file)
@@ -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)