]> code.delx.au - gnu-emacs/commitdiff
Remove some compat code from mm-*.el
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 14 Feb 2016 03:06:23 +0000 (14:06 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 14 Feb 2016 03:06:23 +0000 (14:06 +1100)
* lisp/gnus/mm-bodies.el (mm-decode-body): Ditto.

* lisp/gnus/mm-decode.el (mm-tmp-directory)
(mm-valid-image-format-p): Remove compat code.

* lisp/gnus/mm-url.el (mm-url-insert-file-contents): Remove
"Connection" "Close" workaround for older Emacsen.

lisp/gnus/flow-fill.el
lisp/gnus/gnus-cite.el
lisp/gnus/message.el
lisp/gnus/mm-bodies.el
lisp/gnus/mm-decode.el
lisp/gnus/mm-url.el

index 904f031d0e40d4c2b28509a5b1b95860a81128c1..d28814224757bfb0236d5880ff7fdc332605771a 100644 (file)
@@ -157,7 +157,6 @@ RFC 2646 suggests 66 characters for readability."
            (condition-case nil
                (let ((fill-prefix (when quote (concat quote " ")))
                      (fill-column (eval fill-flowed-display-column))
-                     filladapt-mode
                      adaptive-fill-mode)
                  (fill-region (point-at-bol)
                               (min (1+ (point-at-eol))
index 08816637214e84129f574cfef87534ab25169ef4..4f05d2ee9d519c62555beb9614ce39f8bd427e19 100644 (file)
@@ -527,7 +527,6 @@ longer than the frame width."
          (inhibit-point-motion-hooks t)
          (marks (gnus-dissect-cited-text))
          (adaptive-fill-mode nil)
-         (filladapt-mode nil)
          (fill-column (if width (prefix-numeric-value width) fill-column)))
       (save-restriction
        (while (cdr marks)
index 46f01770480fe5620a4c8b691fe579a1894ef644..f570ff4b0659a991b1dd97a3815c1d0b4501e91f 100644 (file)
@@ -656,10 +656,12 @@ variable should be a regexp or a list of regexps."
 (defun message-send-mail-function ()
   "Return suitable value for the variable `message-send-mail-function'."
   (cond ((and (require 'sendmail)
+             (boundp 'sendmail-program)
              sendmail-program
              (executable-find sendmail-program))
         'message-send-mail-with-sendmail)
        ((and (locate-library "smtpmail")
+             (boundp 'smtpmail-default-smtp-server)
              smtpmail-default-smtp-server)
         'message-smtpmail-send-it)
        ((locate-library "mailclient")
index e07edd324fcca50daa929ee30d9cd946bbd9dd40..91e1a27533852f81481025d1797146cd9b5ba346 100644 (file)
@@ -259,10 +259,7 @@ decoding.  If it is nil, default to `mail-parse-charset'."
                   (or (not (eq coding-system 'ascii))
                       (setq coding-system mail-parse-charset)))
          (decode-coding-region (point-min) (point-max) coding-system))
-       (setq buffer-file-coding-system
-             (if (boundp 'last-coding-system-used)
-                 (symbol-value 'last-coding-system-used)
-               coding-system))))))
+       (setq buffer-file-coding-system last-coding-system-used)))))
 
 (defun mm-decode-string (string charset)
   "Decode STRING with CHARSET."
index 28b08af243982774bbe8100660e109819bee71a5..51fcd8bcd5bbdd8b0acc48054e3193a6fc668ec6 100644 (file)
@@ -382,12 +382,7 @@ enables you to choose manually one of two types those mails include."
   :type '(repeat regexp) ;; See `mm-preferred-alternative-precedence'.
   :group 'mime-display)
 
-(defcustom mm-tmp-directory
-  (if (fboundp 'temp-directory)
-      (temp-directory)
-    (if (boundp 'temporary-file-directory)
-       temporary-file-directory
-      "/tmp/"))
+(defcustom mm-tmp-directory temporary-file-directory
   "Where mm will store its temporary files."
   :type 'directory
   :group 'mime-display)
@@ -1587,8 +1582,7 @@ be determined."
 
 (defun mm-valid-image-format-p (format)
   "Say whether FORMAT can be displayed natively by Emacs."
-  (and (fboundp 'image-type-available-p)
-       (display-graphic-p)
+  (and (display-graphic-p)
        (image-type-available-p format)))
 
 (defun mm-valid-and-fit-image-p (format handle)
@@ -1787,8 +1781,7 @@ If RECURSIVE, search recursively."
 (defun mm-shr (handle)
   ;; Require since we bind its variables.
   (require 'shr)
-  (let ((shr-width (if (and (boundp 'shr-use-fonts)
-                           shr-use-fonts)
+  (let ((shr-width (if shr-use-fonts
                       nil
                     fill-column))
        (shr-content-function (lambda (id)
index fb11d7a07f5e0c6388296d6706ed487f3ca3b3d4..6919266794859d310bea3153691ab16f39b648d3 100644 (file)
@@ -276,19 +276,10 @@ If `mm-url-use-external' is non-nil, use `mm-url-program'."
            (insert-file-contents (substring url (1- (match-end 0))))
          (mm-url-insert-file-contents-external url))
        (goto-char (point-min))
-       (if (fboundp 'url-generic-parse-url)
-           (setq url-current-object
-                 (url-generic-parse-url url)))
+       (setq url-current-object (url-generic-parse-url url))
        (list url (buffer-size)))
     (mm-url-load-url)
     (let ((name buffer-file-name)
-         (url-request-extra-headers
-          ;; ISTM setting a Connection header was a workaround for
-          ;; older versions of url included with w3, but it does more
-          ;; harm than good with the one shipped with Emacs. --ansel
-          (if (not (and (boundp 'url-version)
-                        (equal url-version "Emacs")))
-              (list (cons "Connection" "Close"))))
          result)
       (setq result (url-insert-file-contents url))
       (save-excursion
@@ -296,10 +287,9 @@ If `mm-url-use-external' is non-nil, use `mm-url-program'."
        (while (re-search-forward "\r 1000\r ?" nil t)
          (replace-match "")))
       (setq buffer-file-name name)
-      (if (and (fboundp 'url-generic-parse-url)
-              (listp result))
-         (setq url-current-object (url-generic-parse-url
-                                   (car result))))
+      (when (listp result)
+       (setq url-current-object
+             (url-generic-parse-url (car result))))
       result)))
 
 ;;;###autoload
@@ -399,10 +389,7 @@ spaces.  Die Die Die."
          ((= char ?  ) "+")
          ((memq char mm-url-unreserved-chars) (char-to-string char))
          (t (upcase (format "%%%02x" char)))))
-       (encode-coding-string chunk
-                            (if (fboundp 'find-coding-systems-string)
-                                (car (find-coding-systems-string chunk))
-                              buffer-file-coding-system))
+       (encode-coding-string chunk (car (find-coding-systems-string chunk)))
        "")))
 
 (defun mm-url-encode-www-form-urlencoded (pairs)