diff options
author | Eli Zaretskii <eliz@gnu.org> | 2013-02-09 14:52:01 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2013-02-09 14:52:01 +0200 |
commit | 8549f9e89bd9288c4c709d183a5bf8f07dbeed3d (patch) | |
tree | d1c618cc8dd547322911fc5dab74b7a3235f6448 /doc | |
parent | 2cdd55fc764336b5dee1e69842b9cc2d28976041 (diff) | |
download | emacs-8549f9e89bd9288c4c709d183a5bf8f07dbeed3d.tar.gz |
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 'doc')
-rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
-rw-r--r-- | doc/emacs/msdog.texi | 23 | ||||
-rw-r--r-- | doc/lispref/ChangeLog | 6 | ||||
-rw-r--r-- | doc/lispref/elisp.texi | 2 | ||||
-rw-r--r-- | doc/lispref/modes.texi | 5 | ||||
-rw-r--r-- | doc/lispref/nonascii.texi | 58 |
6 files changed, 11 insertions, 88 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 3b7ab6527aa..d2f44eabb0e 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2013-02-09 Eli Zaretskii <eliz@gnu.org> + + * msdog.texi (Text and Binary): Delete the description of + file-name-buffer-file-type-alist. + 2013-01-19 Paul Eggert <eggert@cs.ucla.edu> * trouble.texi (Crashing): Suggest -p for newer addr2line. (Bug#13445) diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index 2c22c89a113..0f01958b51c 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi @@ -218,29 +218,6 @@ set conversion, only end-of-line conversion. Essentially, it directs Emacs to create new files with the Unix-style convention of using newline at the end of a line. @xref{Coding Systems}. -@vindex file-name-buffer-file-type-alist -@cindex binary files, on MS-DOS/MS-Windows - Some kinds of files should not be converted at all, because their -contents are not really text. Therefore, Emacs on MS-Windows distinguishes -certain files as @dfn{binary files}. (This distinction is not part of -MS-Windows; it is made by Emacs only.) Binary files include executable -programs, compressed archives, etc. Emacs uses the file name to decide -whether to treat a file as binary: the variable -@code{file-name-buffer-file-type-alist} defines the file-name patterns -that indicate binary files. If a file name matches one of the patterns -for binary files (those whose associations are of the type -@code{(@var{pattern} . t)}, Emacs reads and writes that file using the -@code{no-conversion} coding system (@pxref{Coding Systems}) which turns -off @emph{all} coding-system conversions, not only the EOL conversion. -@code{file-name-buffer-file-type-alist} also includes file-name patterns -for files which are known to be Windows-style text files with -carriage-return linefeed EOL format, such as @file{CONFIG.SYS}; Emacs -always writes those files with Windows-style EOLs. - - If a file that belongs to an untranslated file system matches one of -the file-name patterns in @code{file-name-buffer-file-type-alist}, the -EOL conversion is determined by @code{file-name-buffer-file-type-alist}. - @node Windows Files @section File Names on MS-Windows @cindex file names on MS-Windows diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 7c444a038af..90b2349387f 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,9 @@ +2013-02-09 Eli Zaretskii <eliz@gnu.org> + + * modes.texi (%-Constructs): Remove the description of %t. + + * nonascii.texi (MS-DOS File Types): Delete node. + 2013-02-08 Glenn Morris <rgm@gnu.org> * keymaps.texi (Active Keymaps, Searching Keymaps): diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 127b22086d0..3d1c4cf577d 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -1209,8 +1209,6 @@ Coding Systems for a single file operation. * Explicit Encoding:: Encoding or decoding text without doing I/O. * Terminal I/O Encoding:: Use of encoding for terminal I/O. -* MS-DOS File Types:: How DOS "text" and "binary" files - relate to coding systems. Searching and Matching diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 29aba877ba2..71ce2bb9271 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -2150,11 +2150,6 @@ visible on screen; or @samp{Bottom} or @samp{All}. The status of the subprocess belonging to the current buffer, obtained with @code{process-status}. @xref{Process Information}. -@item %t -Whether the visited file is a text file or a binary file. This is a -meaningful distinction only on certain operating systems (@pxref{MS-DOS -File Types}). - @item %z The mnemonics of keyboard, terminal, and buffer coding systems. diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 9ad68be60cb..e462c3b4ce4 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -855,8 +855,6 @@ documented here. for a single file operation. * Explicit Encoding:: Encoding or decoding text without doing I/O. * Terminal I/O Encoding:: Use of encoding for terminal I/O. -* MS-DOS File Types:: How DOS "text" and "binary" files - relate to coding systems. @end menu @node Coding System Basics @@ -1775,62 +1773,6 @@ for encoding terminal output from @var{terminal}. If @code{nil}, that means the currently selected frame's terminal. @end deffn -@node MS-DOS File Types -@subsection MS-DOS File Types -@cindex DOS file types -@cindex MS-DOS file types -@cindex Windows file types -@cindex file types on MS-DOS and Windows -@cindex text files and binary files -@cindex binary files and text files - - On MS-DOS and Microsoft Windows, Emacs guesses the appropriate -end-of-line conversion for a file by looking at the file's name. This -feature classifies files as @dfn{text files} and @dfn{binary files}. By -``binary file'' we mean a file of literal byte values that are not -necessarily meant to be characters; Emacs does no end-of-line conversion -and no character code conversion for them. On the other hand, the bytes -in a text file are intended to represent characters; when you create a -new file whose name implies that it is a text file, Emacs uses DOS -end-of-line conversion. - -@defvar buffer-file-type -This variable, automatically buffer-local in each buffer, records the -file type of the buffer's visited file. When a buffer does not specify -a coding system with @code{buffer-file-coding-system}, this variable is -used to determine which coding system to use when writing the contents -of the buffer. It should be @code{nil} for text, @code{t} for binary. -If it is @code{t}, the coding system is @code{no-conversion}. -Otherwise, @code{undecided-dos} is used. - -Normally this variable is set by visiting a file; it is set to -@code{nil} if the file was visited without any actual conversion. - -Its default value is used to decide how to handle files for which -@code{file-name-buffer-file-type-alist} says nothing about the type: -If the default value is non-@code{nil}, then these files are treated as -binary: the coding system @code{no-conversion} is used. Otherwise, -nothing special is done for them---the coding system is deduced solely -from the file contents, in the usual Emacs fashion. -@end defvar - -@defopt file-name-buffer-file-type-alist -This variable holds an alist for recognizing text and binary files. -Each element has the form (@var{regexp} . @var{type}), where -@var{regexp} is matched against the file name, and @var{type} may be -@code{nil} for text, @code{t} for binary, or a function to call to -compute which. If it is a function, then it is called with a single -argument (the file name) and should return @code{t} or @code{nil}. - -When running on MS-DOS or MS-Windows, Emacs checks this alist to decide -which coding system to use when reading a file. For a text file, -@code{undecided-dos} is used. For a binary file, @code{no-conversion} -is used. - -If no element in this alist matches a given file name, then -the default value of @code{buffer-file-type} says how to treat the file. -@end defopt - @node Input Methods @section Input Methods @cindex input methods |