aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJoakim Verona2013-02-10 00:03:41 +0100
committerJoakim Verona2013-02-10 00:03:41 +0100
commit33cc2cd4d53f845b7d1e681dbbe8166acdb652c3 (patch)
tree551834731473d23116e08cb89facebbc8bad03db /lisp
parent4df065db6acba3975884b435422773ab97f32a00 (diff)
parenteff1c1900f47ec5dfb6d435325b366362d09d2db (diff)
downloademacs-33cc2cd4d53f845b7d1e681dbbe8166acdb652c3.tar.gz
emacs-33cc2cd4d53f845b7d1e681dbbe8166acdb652c3.zip
auto upstream
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog58
-rw-r--r--lisp/arc-mode.el5
-rw-r--r--lisp/dired-x.el19
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/doc-view.el46
-rw-r--r--lisp/dos-w32.el90
-rw-r--r--lisp/emacs-lisp/bytecomp.el2
-rw-r--r--lisp/erc/ChangeLog4
-rw-r--r--lisp/erc/erc-dcc.el1
-rw-r--r--lisp/files.el3
-rw-r--r--lisp/help.el4
-rw-r--r--lisp/jka-compr.el2
-rw-r--r--lisp/mail/feedmail.el23
-rw-r--r--lisp/minibuffer.el5
-rw-r--r--lisp/net/ange-ftp.el6
-rw-r--r--lisp/subr.el10
16 files changed, 160 insertions, 120 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3dea3ed0380..5a9af8c42a0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,61 @@
12013-02-09 Eli Zaretskii <eliz@gnu.org>
2
3 * subr.el (buffer-file-type, default-buffer-file-type): Remove.
4
5 * net/ange-ftp.el (ange-ftp-insert-file-contents): Don't reference
6 buffer-file-type.
7
8 * mail/feedmail.el (feedmail-force-binary-write): Doc fix.
9 (feedmail-run-the-queue, feedmail-dump-message-to-queue)
10 (feedmail-send-it-immediately): Don't bind buffer-file-type, bind
11 coding-system-for-write instead.
12
13 * jka-compr.el (jka-compr-write-region): Don't bind
14 buffer-file-type.
15
16 * emacs-lisp/bytecomp.el (byte-compile-file): Don't bind
17 buffer-file-type.
18
19 * files.el (file-name-buffer-file-type-alist): Remove defvar.
20 (insert-file-contents-literally): Remove reference to
21 file-name-buffer-file-type-alist.
22
23 * dos-w32.el (file-name-buffer-file-type-alist): Deprecate and
24 make-obsolete.
25 (find-buffer-file-type-match, find-buffer-file-type): Remove.
26 (find-buffer-file-type-coding-system): Remove references to
27 find-buffer-file-type-match, find-buffer-file-type, and
28 buffer-file-type.
29 Don't put find-buffer-file-type-coding-system into
30 file-coding-system-alist.
31 (find-file-binary, find-file-text): Bind coding-system-for-read
32 instead of file-name-buffer-file-type-alist.
33
342013-02-09 Tassilo Horn <tsdh@gnu.org>
35
36 * doc-view.el: Use (and prefer) soffice as default ODF->PDF
37 converter (Bug#13622). Patch provided by Jambunathan K
38 <kjambunathan@gmail.com>.
39 (doc-view-unoconv-program): Make obsolete variable.
40 (doc-view-odf->pdf-converter-program): New variable.
41 (doc-view-odf->pdf-converter-function): New variable.
42 (doc-view-mode-p): Use it.
43 (doc-view-odf->pdf-converter-unoconv): Rename from
44 `doc-view-odf->pdf-converter-unoconv'.
45 (doc-view-odf->pdf-converter-soffice): New function.
46 (doc-view-convert-current-doc): Use
47 `doc-view-odf->pdf-converter-function'.
48
492013-02-09 Chong Yidong <cyd@gnu.org>
50
51 * minibuffer.el (minibuffer-inactive-mode-map): Bind mouse-1 to
52 view-echo-area-messages (Bug#13340).
53
54 * help.el (view-echo-area-messages): Use display-buffer.
55
56 * dired-x.el (dired-do-run-mail): Prompt for confirmation
57 (Bug#13561).
58
12013-02-08 Stefan Monnier <monnier@iro.umontreal.ca> 592013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
2 60
3 * emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile): 61 * emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile):
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 8849fb85244..4fc04b706b5 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -975,11 +975,6 @@ using `make-temp-file', and the generated name is returned."
975 (save-excursion 975 (save-excursion
976 (funcall set-auto-coding-function 976 (funcall set-auto-coding-function
977 filename (- (point-max) (point-min))))) 977 filename (- (point-max) (point-min)))))
978 ;; dos-w32.el defines the function
979 ;; find-buffer-file-type-coding-system for DOS/Windows
980 ;; systems which preserves the coding-system of existing files.
981 ;; (That function is called via file-coding-system-alist.)
982 ;; Here, we want it to act as if the extracted file existed.
983 ;; The following let-binding of file-name-handler-alist forces 978 ;; The following let-binding of file-name-handler-alist forces
984 ;; find-file-not-found-set-buffer-file-coding-system to ignore 979 ;; find-file-not-found-set-buffer-file-coding-system to ignore
985 ;; the file's name (see dos-w32.el). 980 ;; the file's name (see dos-w32.el).
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index a2c13033cd1..3cf6654da2b 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1344,13 +1344,20 @@ Otherwise obeys the value of `dired-vm-read-only-folders'."
1344 (rmail (dired-get-filename))) 1344 (rmail (dired-get-filename)))
1345 1345
1346(defun dired-do-run-mail () 1346(defun dired-do-run-mail ()
1347 "If `dired-bind-vm' is non-nil, call `dired-vm', else call `dired-rmail'." 1347 "Visit the current file as a mailbox, using VM or RMAIL.
1348Prompt for confirmation first; if the user says yes, call
1349`dired-vm' if `dired-bind-vm' is non-nil, `dired-rmail'
1350otherwise."
1348 (interactive) 1351 (interactive)
1349 (if dired-bind-vm 1352 (let ((file (dired-get-filename t)))
1350 ;; Read mail folder using vm. 1353 (if dired-bind-vm
1351 (dired-vm) 1354 (if (y-or-n-p (concat "Visit `" file
1352 ;; Read mail folder using rmail. 1355 "' as a mail folder with VM?"))
1353 (dired-rmail))) 1356 (dired-vm))
1357 ;; Read mail folder using rmail.
1358 (if (y-or-n-p (concat "Visit `" file
1359 "' as a mailbox with RMAIL?"))
1360 (dired-rmail)))))
1354 1361
1355 1362
1356;;; MISCELLANEOUS INTERNAL FUNCTIONS. 1363;;; MISCELLANEOUS INTERNAL FUNCTIONS.
diff --git a/lisp/dired.el b/lisp/dired.el
index 30069488586..b5fc46eb78d 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4297,7 +4297,7 @@ instead.
4297;;;*** 4297;;;***
4298 4298
4299;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump) 4299;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
4300;;;;;; "dired-x" "dired-x.el" "cdaacce7c861256289ba48493dd6d0ec") 4300;;;;;; "dired-x" "dired-x.el" "90ba5245f6f5df3bdbda6303c725ef45")
4301;;; Generated autoloads from dired-x.el 4301;;; Generated autoloads from dired-x.el
4302 4302
4303(autoload 'dired-jump "dired-x" "\ 4303(autoload 'dired-jump "dired-x" "\
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 30aa3a09bf2..e7d1ebc35ff 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -231,14 +231,37 @@ If this and `doc-view-dvipdfm-program' are set,
231 :type 'file 231 :type 'file
232 :group 'doc-view) 232 :group 'doc-view)
233 233
234(defcustom doc-view-unoconv-program "unoconv" 234(define-obsolete-variable-alias 'doc-view-unoconv-program
235 'doc-view-odf->pdf-converter-program
236 "24.4")
237
238(defcustom doc-view-odf->pdf-converter-program
239 (cond
240 ((executable-find "soffice") "soffice")
241 ((executable-find "unoconv") "unoconv")
242 (t "soffice"))
235 "Program to convert any file type readable by OpenOffice.org to PDF. 243 "Program to convert any file type readable by OpenOffice.org to PDF.
236 244
237Needed for viewing OpenOffice.org (and MS Office) files." 245Needed for viewing OpenOffice.org (and MS Office) files."
238 :version "24.1" 246 :version "24.4"
239 :type 'file 247 :type 'file
240 :group 'doc-view) 248 :group 'doc-view)
241 249
250(defcustom doc-view-odf->pdf-converter-function
251 (cond
252 ((string-match "unoconv\\'" doc-view-odf->pdf-converter-program)
253 #'doc-view-odf->pdf-converter-unoconv)
254 ((string-match "soffice\\'" doc-view-odf->pdf-converter-program)
255 #'doc-view-odf->pdf-converter-soffice))
256 "Function to call to convert a ODF file into a PDF file."
257 :type '(radio
258 (function-item doc-view-odf->pdf-converter-unoconv
259 :doc "Use unoconv")
260 (function-item doc-view-odf->pdf-converter-soffice
261 :doc "Use LibreOffice")
262 function)
263 :version "24.4")
264
242(defcustom doc-view-ps2pdf-program "ps2pdf" 265(defcustom doc-view-ps2pdf-program "ps2pdf"
243 "Program to convert PS files to PDF. 266 "Program to convert PS files to PDF.
244 267
@@ -700,8 +723,8 @@ OpenDocument format)."
700 (and doc-view-ghostscript-program 723 (and doc-view-ghostscript-program
701 (executable-find doc-view-ghostscript-program))) 724 (executable-find doc-view-ghostscript-program)))
702 ((eq type 'odf) 725 ((eq type 'odf)
703 (and doc-view-unoconv-program 726 (and doc-view-odf->pdf-converter-program
704 (executable-find doc-view-unoconv-program) 727 (executable-find doc-view-odf->pdf-converter-program)
705 (doc-view-mode-p 'pdf))) 728 (doc-view-mode-p 'pdf)))
706 ((eq type 'djvu) 729 ((eq type 'djvu)
707 (executable-find "ddjvu")) 730 (executable-find "ddjvu"))
@@ -903,14 +926,23 @@ If PAGE is nil, convert the whole document."
903 ,@(if page `(,(format "%d" page)))) 926 ,@(if page `(,(format "%d" page))))
904 callback)) 927 callback))
905 928
906(defun doc-view-odf->pdf (odf callback) 929(defun doc-view-odf->pdf-converter-unoconv (odf callback)
907 "Convert ODF to PDF asynchronously and call CALLBACK when finished. 930 "Convert ODF to PDF asynchronously and call CALLBACK when finished.
908The converted PDF is put into the current cache directory, and it 931The converted PDF is put into the current cache directory, and it
909is named like ODF with the extension turned to pdf." 932is named like ODF with the extension turned to pdf."
910 (doc-view-start-process "odf->pdf" doc-view-unoconv-program 933 (doc-view-start-process "odf->pdf" doc-view-odf->pdf-converter-program
911 (list "-f" "pdf" "-o" (doc-view-current-cache-dir) odf) 934 (list "-f" "pdf" "-o" (doc-view-current-cache-dir) odf)
912 callback)) 935 callback))
913 936
937(defun doc-view-odf->pdf-converter-soffice (odf callback)
938 "Convert ODF to PDF asynchronously and call CALLBACK when finished.
939The converted PDF is put into the current cache directory, and it
940is named like ODF with the extension turned to pdf."
941 (doc-view-start-process "odf->pdf" doc-view-odf->pdf-converter-program
942 (list "--headless" "--convert-to" "pdf"
943 "--outdir" (doc-view-current-cache-dir) odf)
944 callback))
945
914(defun doc-view-pdf/ps->png (pdf-ps png) 946(defun doc-view-pdf/ps->png (pdf-ps png)
915 ;; FIXME: Fix name and docstring to account for djvu&tiff. 947 ;; FIXME: Fix name and docstring to account for djvu&tiff.
916 "Convert PDF-PS to PNG asynchronously." 948 "Convert PDF-PS to PNG asynchronously."
@@ -1058,7 +1090,7 @@ Those files are saved in the directory given by the function
1058 ;; The unoconv tool only supports an output directory, but no 1090 ;; The unoconv tool only supports an output directory, but no
1059 ;; file name. It's named like the input file with the 1091 ;; file name. It's named like the input file with the
1060 ;; extension replaced by pdf. 1092 ;; extension replaced by pdf.
1061 (doc-view-odf->pdf doc-view-buffer-file-name 1093 (funcall doc-view-odf->pdf-converter-function doc-view-buffer-file-name
1062 (lambda () 1094 (lambda ()
1063 ;; Rename to doc.pdf 1095 ;; Rename to doc.pdf
1064 (rename-file opdf pdf) 1096 (rename-file opdf pdf)
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el
index 5866edfc3d6..d6788ffe028 100644
--- a/lisp/dos-w32.el
+++ b/lisp/dos-w32.el
@@ -37,7 +37,7 @@
37;; Set the null device (for compile.el). 37;; Set the null device (for compile.el).
38(setq null-device "NUL") 38(setq null-device "NUL")
39 39
40;; For distinguishing file types based upon suffixes. 40;; For distinguishing file types based upon suffixes. DEPRECATED, DO NOT USE!
41(defcustom file-name-buffer-file-type-alist 41(defcustom file-name-buffer-file-type-alist
42 '(("[:/].*config.sys$" . nil) ; config.sys text 42 '(("[:/].*config.sys$" . nil) ; config.sys text
43 ("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|bin\\|ico\\|pif\\|class\\)$" . t) 43 ("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|bin\\|ico\\|pif\\|class\\)$" . t)
@@ -54,36 +54,18 @@
54 ("\\.tp[ulpw]$" . t) ; borland Pascal stuff 54 ("\\.tp[ulpw]$" . t) ; borland Pascal stuff
55 ("[:/]tags$" . nil) ; emacs TAGS file 55 ("[:/]tags$" . nil) ; emacs TAGS file
56 ) 56 )
57 "Alist for distinguishing text files from binary files. 57 "Alist used in the past for distinguishing text files from binary files.
58Each element has the form (REGEXP . TYPE), where REGEXP is matched 58Each element has the form (REGEXP . TYPE), where REGEXP is matched
59against the file name, and TYPE is nil for text, t for binary." 59against the file name, and TYPE is nil for text, t for binary.
60
61This variable is deprecated, not used anywhere, and will soon be deleted."
60 :type '(repeat (cons regexp boolean)) 62 :type '(repeat (cons regexp boolean))
61 :group 'dos-fns 63 :group 'dos-fns
62 :group 'w32) 64 :group 'w32)
63 65
64;; Return the pair matching filename on file-name-buffer-file-type-alist, 66(make-obsolete-variable 'file-name-buffer-file-type-alist
65;; or nil otherwise. 67 'file-coding-system-alist
66(defun find-buffer-file-type-match (filename) 68 "24.4")
67 (let ((alist file-name-buffer-file-type-alist)
68 (found nil))
69 (let ((case-fold-search t))
70 (setq filename (file-name-sans-versions filename))
71 (while (and (not found) alist)
72 (if (string-match (car (car alist)) filename)
73 (setq found (car alist)))
74 (setq alist (cdr alist)))
75 found)))
76
77;; Don't check for untranslated file systems here.
78(defun find-buffer-file-type (filename)
79 (let ((match (find-buffer-file-type-match filename))
80 (code))
81 (if (not match)
82 (default-value 'buffer-file-type)
83 (setq code (cdr match))
84 (cond ((memq code '(nil t)) code)
85 ((and (symbolp code) (fboundp code))
86 (funcall code filename))))))
87 69
88(setq-default buffer-file-coding-system 'undecided-dos) 70(setq-default buffer-file-coding-system 'undecided-dos)
89 71
@@ -99,9 +81,6 @@ and whether the file exists:
99 If it matches in `untranslated-filesystem-list': 81 If it matches in `untranslated-filesystem-list':
100 If the file exists: `undecided' 82 If the file exists: `undecided'
101 If the file does not exist: `undecided-unix' 83 If the file does not exist: `undecided-unix'
102 If it matches in `file-name-buffer-file-type-alist':
103 If the match is t (for binary): `no-conversion'
104 If the match is nil (for dos-text): `undecided-dos'
105 Otherwise: 84 Otherwise:
106 If the file exists: `undecided' 85 If the file exists: `undecided'
107 If the file does not exist default value of `buffer-file-coding-system' 86 If the file does not exist default value of `buffer-file-coding-system'
@@ -110,25 +89,23 @@ Note that the CAR of arguments to `insert-file-contents' operation could
110be a cons cell of the form \(FILENAME . BUFFER\), where BUFFER is a buffer 89be a cons cell of the form \(FILENAME . BUFFER\), where BUFFER is a buffer
111into which the file's contents were already read, but not yet decoded. 90into which the file's contents were already read, but not yet decoded.
112 91
113If operation is `write-region', the coding system is chosen based upon 92If operation is `write-region', the coding system is chosen based
114the value of `buffer-file-coding-system' and `buffer-file-type'. If 93upon the value of `buffer-file-coding-system'. If
115`buffer-file-coding-system' is non-nil, its value is used. If it is 94`buffer-file-coding-system' is non-nil, its value is used.
116nil and `buffer-file-type' is t, the coding system is `no-conversion'.
117Otherwise, it is `undecided-dos'. 95Otherwise, it is `undecided-dos'.
118 96
119The two most common situations are when DOS and Unix files are read 97The most common situation is when DOS and Unix files are read and
120and written, and their names do not match in 98written, and their names do not match in `untranslated-filesystem-list'.
121`untranslated-filesystem-list' and `file-name-buffer-file-type-alist'. 99In these cases, the coding system initially will be `undecided'.
122In these cases, the coding system initially will be `undecided'. As 100As the file is read in the DOS case, the coding system will be
123the file is read in the DOS case, the coding system will be changed to 101changed to `undecided-dos' as CR/LFs are detected. As the file
124`undecided-dos' as CR/LFs are detected. As the file is read in the 102is read in the Unix case, the coding system will be changed to
125Unix case, the coding system will be changed to `undecided-unix' as 103`undecided-unix' as LFs are detected. In both cases,
126LFs are detected. In both cases, `buffer-file-coding-system' will be 104`buffer-file-coding-system' will be set to the appropriate coding
127set to the appropriate coding system, and the value of 105system, and the value of `buffer-file-coding-system' will be used
128`buffer-file-coding-system' will be used when writing the file." 106when writing the file."
129 107
130 (let ((op (nth 0 command)) 108 (let ((op (nth 0 command))
131 (binary nil) (text nil)
132 (undecided nil) (undecided-unix nil) 109 (undecided nil) (undecided-unix nil)
133 target target-buf) 110 target target-buf)
134 (cond ((eq op 'insert-file-contents) 111 (cond ((eq op 'insert-file-contents)
@@ -144,15 +121,8 @@ set to the appropriate coding system, and the value of
144 (and (bufferp (cdr target)) 121 (and (bufferp (cdr target))
145 (buffer-name (cdr target)))) 122 (buffer-name (cdr target))))
146 (setq target (car target))) 123 (setq target (car target)))
147 ;; First check for a file name that indicates 124 (cond ((or
148 ;; it is truly binary. 125 ;; For any existing file, decide based on contents.
149 (setq binary (find-buffer-file-type target))
150 (cond (binary)
151 ;; Next check for files that MUST use DOS eol conversion.
152 ((find-buffer-file-type-match target)
153 (setq text t))
154 ;; For any other existing file, decide based on contents.
155 ((or
156 (file-exists-p target) 126 (file-exists-p target)
157 ;; If TARGET does not exist as a file, replace its 127 ;; If TARGET does not exist as a file, replace its
158 ;; base name with TARGET-BUF and try again. This 128 ;; base name with TARGET-BUF and try again. This
@@ -167,9 +137,7 @@ set to the appropriate coding system, and the value of
167 ;; Next check for a non-DOS file system. 137 ;; Next check for a non-DOS file system.
168 ((untranslated-file-p target) 138 ((untranslated-file-p target)
169 (setq undecided-unix t))) 139 (setq undecided-unix t)))
170 (cond (binary '(no-conversion . no-conversion)) 140 (cond (undecided-unix '(undecided-unix . undecided-unix))
171 (text '(undecided-dos . undecided-dos))
172 (undecided-unix '(undecided-unix . undecided-unix))
173 (undecided '(undecided . undecided)) 141 (undecided '(undecided . undecided))
174 (t (cons (default-value 'buffer-file-coding-system) 142 (t (cons (default-value 'buffer-file-coding-system)
175 (default-value 'buffer-file-coding-system))))) 143 (default-value 'buffer-file-coding-system)))))
@@ -180,22 +148,18 @@ set to the appropriate coding system, and the value of
180 ;; Normally this is used only in a non-file-visiting 148 ;; Normally this is used only in a non-file-visiting
181 ;; buffer, because normally buffer-file-coding-system is non-nil 149 ;; buffer, because normally buffer-file-coding-system is non-nil
182 ;; in a file-visiting buffer. 150 ;; in a file-visiting buffer.
183 (if buffer-file-type 151 '(undecided-dos . undecided-dos))))))
184 '(no-conversion . no-conversion)
185 '(undecided-dos . undecided-dos)))))))
186
187(modify-coding-system-alist 'file "" 'find-buffer-file-type-coding-system)
188 152
189(defun find-file-binary (filename) 153(defun find-file-binary (filename)
190 "Visit file FILENAME and treat it as binary." 154 "Visit file FILENAME and treat it as binary."
191 (interactive "FFind file binary: ") 155 (interactive "FFind file binary: ")
192 (let ((file-name-buffer-file-type-alist '(("" . t)))) 156 (let ((coding-system-for-read 'no-conversion))
193 (find-file filename))) 157 (find-file filename)))
194 158
195(defun find-file-text (filename) 159(defun find-file-text (filename)
196 "Visit file FILENAME and treat it as a text file." 160 "Visit file FILENAME and treat it as a text file."
197 (interactive "FFind file text: ") 161 (interactive "FFind file text: ")
198 (let ((file-name-buffer-file-type-alist '(("" . nil)))) 162 (let ((coding-system-for-read 'undecided-dos))
199 (find-file filename))) 163 (find-file filename)))
200 164
201(defun find-file-not-found-set-buffer-file-coding-system () 165(defun find-file-not-found-set-buffer-file-coding-system ()
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 4e002cfc8cb..280a1bbc2dd 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1795,8 +1795,6 @@ The value is non-nil if there were no errors, nil if errors."
1795 (kill-emacs-hook 1795 (kill-emacs-hook
1796 (cons (lambda () (ignore-errors (delete-file tempfile))) 1796 (cons (lambda () (ignore-errors (delete-file tempfile)))
1797 kill-emacs-hook))) 1797 kill-emacs-hook)))
1798 (if (memq system-type '(ms-dos 'windows-nt))
1799 (setq buffer-file-type t))
1800 (write-region (point-min) (point-max) tempfile nil 1) 1798 (write-region (point-min) (point-max) tempfile nil 1)
1801 ;; This has the intentional side effect that any 1799 ;; This has the intentional side effect that any
1802 ;; hard-links to target-file continue to 1800 ;; hard-links to target-file continue to
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index bbe551c735d..cc7624dee03 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,7 @@
12013-02-09 Eli Zaretskii <eliz@gnu.org>
2
3 * erc-dcc.el (erc-dcc-get-file): Don't reference buffer-file-type.
4
12013-01-11 Dmitry Antipov <dmantipov@yandex.ru> 52013-01-11 Dmitry Antipov <dmantipov@yandex.ru>
2 6
3 * erc-dcc.el (erc-dcc-send-file): Use point-min-marker. 7 * erc-dcc.el (erc-dcc-send-file): Use point-min-marker.
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index c27bb629f9d..acb8febea80 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -942,7 +942,6 @@ filter and a process sentinel, and making the connection."
942 (set-buffer-multibyte nil)) 942 (set-buffer-multibyte nil))
943 943
944 (setq mode-line-process '(":%s") 944 (setq mode-line-process '(":%s")
945 buffer-file-type t
946 buffer-read-only t) 945 buffer-read-only t)
947 (setq erc-dcc-file-name file) 946 (setq erc-dcc-file-name file)
948 947
diff --git a/lisp/files.el b/lisp/files.el
index 3bc3059c68f..9fca70d36f7 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1983,8 +1983,6 @@ Do you want to revisit the file normally now? ")
1983 (after-find-file error (not nowarn))) 1983 (after-find-file error (not nowarn)))
1984 (current-buffer)))) 1984 (current-buffer))))
1985 1985
1986(defvar file-name-buffer-file-type-alist) ;From dos-w32.el.
1987
1988(defun insert-file-contents-literally (filename &optional visit beg end replace) 1986(defun insert-file-contents-literally (filename &optional visit beg end replace)
1989 "Like `insert-file-contents', but only reads in the file literally. 1987 "Like `insert-file-contents', but only reads in the file literally.
1990A buffer may be modified in several ways after reading into the buffer, 1988A buffer may be modified in several ways after reading into the buffer,
@@ -1996,7 +1994,6 @@ This function ensures that none of these modifications will take place."
1996 (after-insert-file-functions nil) 1994 (after-insert-file-functions nil)
1997 (coding-system-for-read 'no-conversion) 1995 (coding-system-for-read 'no-conversion)
1998 (coding-system-for-write 'no-conversion) 1996 (coding-system-for-write 'no-conversion)
1999 (file-name-buffer-file-type-alist '(("" . t)))
2000 (inhibit-file-name-handlers 1997 (inhibit-file-name-handlers
2001 ;; FIXME: Yuck!! We should turn insert-file-contents-literally 1998 ;; FIXME: Yuck!! We should turn insert-file-contents-literally
2002 ;; into a file operation instead! 1999 ;; into a file operation instead!
diff --git a/lisp/help.el b/lisp/help.el
index 4219dd86986..25bc9c4b7c6 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -412,7 +412,9 @@ With argument, display info only for the selected version."
412The number of messages retained in that buffer 412The number of messages retained in that buffer
413is specified by the variable `message-log-max'." 413is specified by the variable `message-log-max'."
414 (interactive) 414 (interactive)
415 (switch-to-buffer (get-buffer-create "*Messages*"))) 415 (with-current-buffer (get-buffer-create "*Messages*")
416 (goto-char (point-max))
417 (display-buffer (current-buffer))))
416 418
417(defun view-order-manuals () 419(defun view-order-manuals ()
418 "Display the Emacs ORDERS file." 420 "Display the Emacs ORDERS file."
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index ac81cf0d52d..5664a890cb1 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -332,8 +332,6 @@ There should be no more than seven characters after the final `/'."
332 332
333 (with-current-buffer temp-buffer 333 (with-current-buffer temp-buffer
334 (let ((coding-system-for-write 'no-conversion)) 334 (let ((coding-system-for-write 'no-conversion))
335 (if (memq system-type '(ms-dos windows-nt))
336 (setq buffer-file-type t) )
337 (jka-compr-run-real-handler 'write-region 335 (jka-compr-run-real-handler 'write-region
338 (list (point-min) (point-max) 336 (list (point-min) (point-max)
339 filename 337 filename
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)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 0d2815e535e..e18f4c9c77f 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2045,10 +2045,7 @@ with `minibuffer-local-must-match-map'.")
2045 (define-key map "i" 'info) 2045 (define-key map "i" 'info)
2046 (define-key map "m" 'mail) 2046 (define-key map "m" 'mail)
2047 (define-key map "n" 'make-frame) 2047 (define-key map "n" 'make-frame)
2048 (define-key map [mouse-1] (lambda () (interactive) 2048 (define-key map [mouse-1] 'view-echo-area-messages)
2049 (with-current-buffer "*Messages*"
2050 (goto-char (point-max))
2051 (display-buffer (current-buffer)))))
2052 ;; So the global down-mouse-1 binding doesn't clutter the execution of the 2049 ;; So the global down-mouse-1 binding doesn't clutter the execution of the
2053 ;; above mouse-1 binding. 2050 ;; above mouse-1 binding.
2054 (define-key map [down-mouse-1] #'ignore) 2051 (define-key map [down-mouse-1] #'ignore)
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 4f7d8092891..ea318ec3250 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -3297,7 +3297,6 @@ system TYPE.")
3297 (name (ange-ftp-quote-string (nth 2 parsed))) 3297 (name (ange-ftp-quote-string (nth 2 parsed)))
3298 (temp (ange-ftp-make-tmp-name host)) 3298 (temp (ange-ftp-make-tmp-name host))
3299 (binary (ange-ftp-binary-file filename)) 3299 (binary (ange-ftp-binary-file filename))
3300 (buffer-file-type buffer-file-type)
3301 (abbr (ange-ftp-abbreviate-filename filename)) 3300 (abbr (ange-ftp-abbreviate-filename filename))
3302 (coding-system-used last-coding-system-used) 3301 (coding-system-used last-coding-system-used)
3303 size) 3302 size)
@@ -3322,10 +3321,7 @@ system TYPE.")
3322 size 3321 size
3323 (nth 1 (ange-ftp-real-insert-file-contents 3322 (nth 1 (ange-ftp-real-insert-file-contents
3324 temp visit beg end replace)) 3323 temp visit beg end replace))
3325 coding-system-used last-coding-system-used 3324 coding-system-used last-coding-system-used)
3326 ;; override autodetection of buffer file type
3327 ;; to ensure buffer is saved in DOS format
3328 buffer-file-type binary)
3329 (signal 'ftp-error 3325 (signal 'ftp-error
3330 (list 3326 (list
3331 "Opening input file:" 3327 "Opening input file:"
diff --git a/lisp/subr.el b/lisp/subr.el
index 31cbb9a0a8a..db2b6a8eaad 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1229,7 +1229,6 @@ is converted into a string by expressing it in decimal."
1229(make-obsolete-variable 'default-scroll-down-aggressively 'scroll-down-aggressively "23.2") 1229(make-obsolete-variable 'default-scroll-down-aggressively 'scroll-down-aggressively "23.2")
1230(make-obsolete-variable 'default-fill-column 'fill-column "23.2") 1230(make-obsolete-variable 'default-fill-column 'fill-column "23.2")
1231(make-obsolete-variable 'default-cursor-type 'cursor-type "23.2") 1231(make-obsolete-variable 'default-cursor-type 'cursor-type "23.2")
1232(make-obsolete-variable 'default-buffer-file-type 'buffer-file-type "23.2")
1233(make-obsolete-variable 'default-cursor-in-non-selected-windows 'cursor-in-non-selected-windows "23.2") 1232(make-obsolete-variable 'default-cursor-in-non-selected-windows 'cursor-in-non-selected-windows "23.2")
1234(make-obsolete-variable 'default-buffer-file-coding-system 'buffer-file-coding-system "23.2") 1233(make-obsolete-variable 'default-buffer-file-coding-system 'buffer-file-coding-system "23.2")
1235(make-obsolete-variable 'default-major-mode 'major-mode "23.2") 1234(make-obsolete-variable 'default-major-mode 'major-mode "23.2")
@@ -2622,15 +2621,6 @@ When the hook runs, the temporary buffer is current.
2622This hook is normally set up with a function to put the buffer in Help 2621This hook is normally set up with a function to put the buffer in Help
2623mode.") 2622mode.")
2624 2623
2625(defvar-local buffer-file-type nil
2626 "Non-nil if the visited file is a binary file.
2627This variable is meaningful on MS-DOG and MS-Windows.
2628On those systems, it is automatically local in every buffer.
2629On other systems, this variable is normally always nil.
2630
2631WARNING: This variable is obsolete and will disappear Real Soon Now.
2632Don't use it!")
2633
2634;; The `assert' macro from the cl package signals 2624;; The `assert' macro from the cl package signals
2635;; `cl-assertion-failed' at runtime so always define it. 2625;; `cl-assertion-failed' at runtime so always define it.
2636(put 'cl-assertion-failed 'error-conditions '(error)) 2626(put 'cl-assertion-failed 'error-conditions '(error))