aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail
diff options
context:
space:
mode:
authorEli Zaretskii2013-02-09 14:52:01 +0200
committerEli Zaretskii2013-02-09 14:52:01 +0200
commit8549f9e89bd9288c4c709d183a5bf8f07dbeed3d (patch)
treed1c618cc8dd547322911fc5dab74b7a3235f6448 /lisp/mail
parent2cdd55fc764336b5dee1e69842b9cc2d28976041 (diff)
downloademacs-8549f9e89bd9288c4c709d183a5bf8f07dbeed3d.tar.gz
emacs-8549f9e89bd9288c4c709d183a5bf8f07dbeed3d.zip
Remove all references to buffer-file-type and related features.
src/xdisp.c (decode_mode_spec): Remove handling of %t. lisp/net/ange-ftp.el (ange-ftp-insert-file-contents): Don't reference buffer-file-type. lisp/mail/feedmail.el (feedmail-force-binary-write): Doc fix. (feedmail-run-the-queue, feedmail-dump-message-to-queue) (feedmail-send-it-immediately): Don't bind buffer-file-type, bind coding-system-for-write instead. lisp/jka-compr.el (jka-compr-write-region): Don't bind buffer-file-type. lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't bind buffer-file-type. lisp/files.el (file-name-buffer-file-type-alist): Remove defvar. (insert-file-contents-literally): Remove reference to file-name-buffer-file-type-alist. lisp/dos-w32.el (file-name-buffer-file-type-alist): Deprecate and make-obsolete. (find-buffer-file-type-match, find-buffer-file-type): Remove. (find-buffer-file-type-coding-system): Remove references to find-buffer-file-type-match, find-buffer-file-type, and buffer-file-type. Don't put find-buffer-file-type-coding-system into file-coding-system-alist. (find-file-binary, find-file-text): Bind coding-system-for-read instead of file-name-buffer-file-type-alist. lisp/erc/erc-dcc.el (erc-dcc-get-file): Don't reference buffer-file-type. doc/emacs/msdog.texi (Text and Binary): Delete the description of file-name-buffer-file-type-alist. doc/lispref/modes.texi (%-Constructs): Remove the description of %t. doc/lispref/nonascii.texi (MS-DOS File Types): Delete node. Fixes: debbugs:12989
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/feedmail.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 4305094611a..0502e7f9487 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -590,7 +590,7 @@ header is fiddled after the From: header is fiddled."
590(defcustom feedmail-force-binary-write t 590(defcustom feedmail-force-binary-write t
591 "If non-nil, force writing file as binary (this applies to queues and Fcc:). 591 "If non-nil, force writing file as binary (this applies to queues and Fcc:).
592On systems where there is a difference between binary and text files, 592On systems where there is a difference between binary and text files,
593feedmail will temporarily manipulate the value of `buffer-file-type' 593feedmail will temporarily manipulate the value of `coding-system-for-write'
594to make the writing as binary. If nil, writing will be in text mode. 594to make the writing as binary. If nil, writing will be in text mode.
595On systems where there is no distinction or where it is controlled by other 595On systems where there is no distinction or where it is controlled by other
596variables or other means, this option has no effect." 596variables or other means, this option has no effect."
@@ -2016,7 +2016,6 @@ backup file names and the like)."
2016 (setq buffer-offer-save nil) 2016 (setq buffer-offer-save nil)
2017 (buffer-disable-undo blobby-buffer) 2017 (buffer-disable-undo blobby-buffer)
2018 (insert-file-contents-literally maybe-file) 2018 (insert-file-contents-literally maybe-file)
2019 (setq buffer-file-type t) ; binary
2020 (goto-char (point-min)) 2019 (goto-char (point-min))
2021 ;; if at least two line-endings with CRLF, translate the file 2020 ;; if at least two line-endings with CRLF, translate the file
2022 (if (looking-at ".*\r\n.*\r\n") 2021 (if (looking-at ".*\r\n.*\r\n")
@@ -2334,7 +2333,10 @@ mapped to mostly alphanumerics for safety."
2334 (setq filename buffer-file-name) 2333 (setq filename buffer-file-name)
2335 (setq filename (feedmail-create-queue-filename queue-directory))) 2334 (setq filename (feedmail-create-queue-filename queue-directory)))
2336 ;; make binary file on DOS/Windows 95/Windows NT, etc 2335 ;; make binary file on DOS/Windows 95/Windows NT, etc
2337 (let ((buffer-file-type feedmail-force-binary-write)) 2336 (let ((coding-system-for-write
2337 (if feedmail-force-binary-write
2338 'no-conversion
2339 coding-system-for-write)))
2338 (write-file filename)) 2340 (write-file filename))
2339 ;; convenient for moving from draft to q, for example 2341 ;; convenient for moving from draft to q, for example
2340 (if (and previous-buffer-file-name (or (not is-fqm) (not is-in-this-dir)) 2342 (if (and previous-buffer-file-name (or (not is-fqm) (not is-in-this-dir))
@@ -2571,26 +2573,27 @@ mapped to mostly alphanumerics for safety."
2571 ;; Re-insert and handle any Fcc fields (and, optionally, 2573 ;; Re-insert and handle any Fcc fields (and, optionally,
2572 ;; any Bcc). 2574 ;; any Bcc).
2573 (when fcc 2575 (when fcc
2574 (let ((old (default-value 'buffer-file-type))) 2576 (let ((coding-system-for-write
2577 (if (and (memq system-type '(ms-dos windows-nt))
2578 feedmail-force-binary-write)
2579 'no-conversion
2580 coding-system-for-write)))
2575 (unwind-protect 2581 (unwind-protect
2576 (progn 2582 (progn
2577 (setq-default buffer-file-type
2578 feedmail-force-binary-write)
2579 (insert fcc) 2583 (insert fcc)
2580 (unless feedmail-nuke-bcc-in-fcc 2584 (unless feedmail-nuke-bcc-in-fcc
2581 (if bcc-holder (insert bcc-holder)) 2585 (if bcc-holder (insert bcc-holder))
2582 (if resent-bcc-holder 2586 (if resent-bcc-holder
2583 (insert resent-bcc-holder))) 2587 (insert resent-bcc-holder)))
2584 2588
2585 (run-hooks 'feedmail-before-fcc-hook) 2589 (run-hooks 'feedmail-before-fcc-hook)
2586 2590
2587 (when feedmail-nuke-body-in-fcc 2591 (when feedmail-nuke-body-in-fcc
2588 (goto-char eoh-marker) 2592 (goto-char eoh-marker)
2589 (if (natnump feedmail-nuke-body-in-fcc) 2593 (if (natnump feedmail-nuke-body-in-fcc)
2590 (forward-line feedmail-nuke-body-in-fcc)) 2594 (forward-line feedmail-nuke-body-in-fcc))
2591 (delete-region (point) (point-max))) 2595 (delete-region (point) (point-max)))
2592 (mail-do-fcc eoh-marker)) 2596 (mail-do-fcc eoh-marker))))))
2593 (setq-default buffer-file-type old)))))
2594 ;; User bailed out of one-last-look. 2597 ;; User bailed out of one-last-look.
2595 (if feedmail-queue-runner-is-active 2598 (if feedmail-queue-runner-is-active
2596 (throw 'skip-me-q 'skip-me-q) 2599 (throw 'skip-me-q 'skip-me-q)