[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 014e0d1 02/12: Remove some compat code from mm-*.el
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 014e0d1 02/12: Remove some compat code from mm-*.el |
Date: |
Sun, 14 Feb 2016 04:16:30 +0000 |
branch: master
commit 014e0d151949c5ecba667f36ca449cbbb719eb54
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Remove some compat code from mm-*.el
* 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 | 1 -
lisp/gnus/gnus-cite.el | 1 -
lisp/gnus/message.el | 2 ++
lisp/gnus/mm-bodies.el | 5 +----
lisp/gnus/mm-decode.el | 13 +++----------
lisp/gnus/mm-url.el | 23 +++++------------------
6 files changed, 11 insertions(+), 34 deletions(-)
diff --git a/lisp/gnus/flow-fill.el b/lisp/gnus/flow-fill.el
index 904f031..d288142 100644
--- a/lisp/gnus/flow-fill.el
+++ b/lisp/gnus/flow-fill.el
@@ -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))
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index 0881663..4f05d2e 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -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)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 46f0177..f570ff4 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -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")
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index e07edd3..91e1a27 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -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."
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 28b08af..51fcd8b 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -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)
diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el
index fb11d7a..6919266 100644
--- a/lisp/gnus/mm-url.el
+++ b/lisp/gnus/mm-url.el
@@ -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)
- [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 <=
- [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, 2016/02/13
- [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