diff options
| author | Lars Ingebrigtsen | 2016-02-14 14:06:23 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-14 14:06:23 +1100 |
| commit | 014e0d151949c5ecba667f36ca449cbbb719eb54 (patch) | |
| tree | bdfff57120669c4aa7196e3903355080a35f918e | |
| parent | b9baa80d7f550c1b51613398db2b106bc7220e8b (diff) | |
| download | emacs-014e0d151949c5ecba667f36ca449cbbb719eb54.tar.gz emacs-014e0d151949c5ecba667f36ca449cbbb719eb54.zip | |
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.
| -rw-r--r-- | lisp/gnus/flow-fill.el | 1 | ||||
| -rw-r--r-- | lisp/gnus/gnus-cite.el | 1 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/mm-bodies.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/mm-decode.el | 13 | ||||
| -rw-r--r-- | 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 904f031d0e4..d2881422475 100644 --- a/lisp/gnus/flow-fill.el +++ b/lisp/gnus/flow-fill.el | |||
| @@ -157,7 +157,6 @@ RFC 2646 suggests 66 characters for readability." | |||
| 157 | (condition-case nil | 157 | (condition-case nil |
| 158 | (let ((fill-prefix (when quote (concat quote " "))) | 158 | (let ((fill-prefix (when quote (concat quote " "))) |
| 159 | (fill-column (eval fill-flowed-display-column)) | 159 | (fill-column (eval fill-flowed-display-column)) |
| 160 | filladapt-mode | ||
| 161 | adaptive-fill-mode) | 160 | adaptive-fill-mode) |
| 162 | (fill-region (point-at-bol) | 161 | (fill-region (point-at-bol) |
| 163 | (min (1+ (point-at-eol)) | 162 | (min (1+ (point-at-eol)) |
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 08816637214..4f05d2ee9d5 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el | |||
| @@ -527,7 +527,6 @@ longer than the frame width." | |||
| 527 | (inhibit-point-motion-hooks t) | 527 | (inhibit-point-motion-hooks t) |
| 528 | (marks (gnus-dissect-cited-text)) | 528 | (marks (gnus-dissect-cited-text)) |
| 529 | (adaptive-fill-mode nil) | 529 | (adaptive-fill-mode nil) |
| 530 | (filladapt-mode nil) | ||
| 531 | (fill-column (if width (prefix-numeric-value width) fill-column))) | 530 | (fill-column (if width (prefix-numeric-value width) fill-column))) |
| 532 | (save-restriction | 531 | (save-restriction |
| 533 | (while (cdr marks) | 532 | (while (cdr marks) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 46f01770480..f570ff4b065 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." | |||
| 656 | (defun message-send-mail-function () | 656 | (defun message-send-mail-function () |
| 657 | "Return suitable value for the variable `message-send-mail-function'." | 657 | "Return suitable value for the variable `message-send-mail-function'." |
| 658 | (cond ((and (require 'sendmail) | 658 | (cond ((and (require 'sendmail) |
| 659 | (boundp 'sendmail-program) | ||
| 659 | sendmail-program | 660 | sendmail-program |
| 660 | (executable-find sendmail-program)) | 661 | (executable-find sendmail-program)) |
| 661 | 'message-send-mail-with-sendmail) | 662 | 'message-send-mail-with-sendmail) |
| 662 | ((and (locate-library "smtpmail") | 663 | ((and (locate-library "smtpmail") |
| 664 | (boundp 'smtpmail-default-smtp-server) | ||
| 663 | smtpmail-default-smtp-server) | 665 | smtpmail-default-smtp-server) |
| 664 | 'message-smtpmail-send-it) | 666 | 'message-smtpmail-send-it) |
| 665 | ((locate-library "mailclient") | 667 | ((locate-library "mailclient") |
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el index e07edd324fc..91e1a275338 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'." | |||
| 259 | (or (not (eq coding-system 'ascii)) | 259 | (or (not (eq coding-system 'ascii)) |
| 260 | (setq coding-system mail-parse-charset))) | 260 | (setq coding-system mail-parse-charset))) |
| 261 | (decode-coding-region (point-min) (point-max) coding-system)) | 261 | (decode-coding-region (point-min) (point-max) coding-system)) |
| 262 | (setq buffer-file-coding-system | 262 | (setq buffer-file-coding-system last-coding-system-used))))) |
| 263 | (if (boundp 'last-coding-system-used) | ||
| 264 | (symbol-value 'last-coding-system-used) | ||
| 265 | coding-system)))))) | ||
| 266 | 263 | ||
| 267 | (defun mm-decode-string (string charset) | 264 | (defun mm-decode-string (string charset) |
| 268 | "Decode STRING with CHARSET." | 265 | "Decode STRING with CHARSET." |
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 28b08af2439..51fcd8bcd5b 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." | |||
| 382 | :type '(repeat regexp) ;; See `mm-preferred-alternative-precedence'. | 382 | :type '(repeat regexp) ;; See `mm-preferred-alternative-precedence'. |
| 383 | :group 'mime-display) | 383 | :group 'mime-display) |
| 384 | 384 | ||
| 385 | (defcustom mm-tmp-directory | 385 | (defcustom mm-tmp-directory temporary-file-directory |
| 386 | (if (fboundp 'temp-directory) | ||
| 387 | (temp-directory) | ||
| 388 | (if (boundp 'temporary-file-directory) | ||
| 389 | temporary-file-directory | ||
| 390 | "/tmp/")) | ||
| 391 | "Where mm will store its temporary files." | 386 | "Where mm will store its temporary files." |
| 392 | :type 'directory | 387 | :type 'directory |
| 393 | :group 'mime-display) | 388 | :group 'mime-display) |
| @@ -1587,8 +1582,7 @@ be determined." | |||
| 1587 | 1582 | ||
| 1588 | (defun mm-valid-image-format-p (format) | 1583 | (defun mm-valid-image-format-p (format) |
| 1589 | "Say whether FORMAT can be displayed natively by Emacs." | 1584 | "Say whether FORMAT can be displayed natively by Emacs." |
| 1590 | (and (fboundp 'image-type-available-p) | 1585 | (and (display-graphic-p) |
| 1591 | (display-graphic-p) | ||
| 1592 | (image-type-available-p format))) | 1586 | (image-type-available-p format))) |
| 1593 | 1587 | ||
| 1594 | (defun mm-valid-and-fit-image-p (format handle) | 1588 | (defun mm-valid-and-fit-image-p (format handle) |
| @@ -1787,8 +1781,7 @@ If RECURSIVE, search recursively." | |||
| 1787 | (defun mm-shr (handle) | 1781 | (defun mm-shr (handle) |
| 1788 | ;; Require since we bind its variables. | 1782 | ;; Require since we bind its variables. |
| 1789 | (require 'shr) | 1783 | (require 'shr) |
| 1790 | (let ((shr-width (if (and (boundp 'shr-use-fonts) | 1784 | (let ((shr-width (if shr-use-fonts |
| 1791 | shr-use-fonts) | ||
| 1792 | nil | 1785 | nil |
| 1793 | fill-column)) | 1786 | fill-column)) |
| 1794 | (shr-content-function (lambda (id) | 1787 | (shr-content-function (lambda (id) |
diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el index fb11d7a07f5..69192667948 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'." | |||
| 276 | (insert-file-contents (substring url (1- (match-end 0)))) | 276 | (insert-file-contents (substring url (1- (match-end 0)))) |
| 277 | (mm-url-insert-file-contents-external url)) | 277 | (mm-url-insert-file-contents-external url)) |
| 278 | (goto-char (point-min)) | 278 | (goto-char (point-min)) |
| 279 | (if (fboundp 'url-generic-parse-url) | 279 | (setq url-current-object (url-generic-parse-url url)) |
| 280 | (setq url-current-object | ||
| 281 | (url-generic-parse-url url))) | ||
| 282 | (list url (buffer-size))) | 280 | (list url (buffer-size))) |
| 283 | (mm-url-load-url) | 281 | (mm-url-load-url) |
| 284 | (let ((name buffer-file-name) | 282 | (let ((name buffer-file-name) |
| 285 | (url-request-extra-headers | ||
| 286 | ;; ISTM setting a Connection header was a workaround for | ||
| 287 | ;; older versions of url included with w3, but it does more | ||
| 288 | ;; harm than good with the one shipped with Emacs. --ansel | ||
| 289 | (if (not (and (boundp 'url-version) | ||
| 290 | (equal url-version "Emacs"))) | ||
| 291 | (list (cons "Connection" "Close")))) | ||
| 292 | result) | 283 | result) |
| 293 | (setq result (url-insert-file-contents url)) | 284 | (setq result (url-insert-file-contents url)) |
| 294 | (save-excursion | 285 | (save-excursion |
| @@ -296,10 +287,9 @@ If `mm-url-use-external' is non-nil, use `mm-url-program'." | |||
| 296 | (while (re-search-forward "\r 1000\r ?" nil t) | 287 | (while (re-search-forward "\r 1000\r ?" nil t) |
| 297 | (replace-match ""))) | 288 | (replace-match ""))) |
| 298 | (setq buffer-file-name name) | 289 | (setq buffer-file-name name) |
| 299 | (if (and (fboundp 'url-generic-parse-url) | 290 | (when (listp result) |
| 300 | (listp result)) | 291 | (setq url-current-object |
| 301 | (setq url-current-object (url-generic-parse-url | 292 | (url-generic-parse-url (car result)))) |
| 302 | (car result)))) | ||
| 303 | result))) | 293 | result))) |
| 304 | 294 | ||
| 305 | ;;;###autoload | 295 | ;;;###autoload |
| @@ -399,10 +389,7 @@ spaces. Die Die Die." | |||
| 399 | ((= char ? ) "+") | 389 | ((= char ? ) "+") |
| 400 | ((memq char mm-url-unreserved-chars) (char-to-string char)) | 390 | ((memq char mm-url-unreserved-chars) (char-to-string char)) |
| 401 | (t (upcase (format "%%%02x" char))))) | 391 | (t (upcase (format "%%%02x" char))))) |
| 402 | (encode-coding-string chunk | 392 | (encode-coding-string chunk (car (find-coding-systems-string chunk))) |
| 403 | (if (fboundp 'find-coding-systems-string) | ||
| 404 | (car (find-coding-systems-string chunk)) | ||
| 405 | buffer-file-coding-system)) | ||
| 406 | ""))) | 393 | ""))) |
| 407 | 394 | ||
| 408 | (defun mm-url-encode-www-form-urlencoded (pairs) | 395 | (defun mm-url-encode-www-form-urlencoded (pairs) |