diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2006-07-29 09:59:12 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2006-07-29 09:59:12 +0000 |
commit | 251bc578cc636223d618d06cf2a2bb7d07db9cce (patch) | |
tree | 58e1c6b0a35bb4a77e6cb77876e4bc6a9d3f2ab2 /lisp/dos-w32.el | |
parent | 99715bbc447eb633e45ffa23b87284771ce3ac74 (diff) | |
parent | 0ed0527cb02180a50f6744086ce3a487740c73e4 (diff) | |
download | emacs-251bc578cc636223d618d06cf2a2bb7d07db9cce.tar.gz emacs-251bc578cc636223d618d06cf2a2bb7d07db9cce.tar.bz2 emacs-251bc578cc636223d618d06cf2a2bb7d07db9cce.zip |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-351
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-352
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-353
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-354
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-355
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-356
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-357
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-358
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-359
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-360
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-361
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-362
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-363
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-364
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-365
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-366
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-367
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-368
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-369
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-370
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-115
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-116
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-117
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-118
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-119
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-120
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-573
Diffstat (limited to 'lisp/dos-w32.el')
-rw-r--r-- | lisp/dos-w32.el | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index 2d730c8af0f..5fb6d5a0f6b 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el @@ -88,10 +88,13 @@ against the file name, and TYPE is nil for text, t for binary.") (setq-default buffer-file-coding-system 'undecided-dos) (defun find-buffer-file-type-coding-system (command) - "Choose a coding system for a file operation. -If COMMAND is `insert-file-contents', the coding system is chosen based -upon the filename, the contents of `untranslated-filesystem-list' and -`file-name-buffer-file-type-alist', and whether the file exists: + "Choose a coding system for a file operation in COMMAND. +COMMAND is a list that specifies the operation, and I/O primitive as its +CAR, and the arguments that might be given to that operation as its CDR. +If operation is `insert-file-contents', the coding system is chosen based +upon the filename (the CAR of the arguments beyond the operation), the contents +of `untranslated-filesystem-list' and `file-name-buffer-file-type-alist', +and whether the file exists: If it matches in `untranslated-filesystem-list': If the file exists: `undecided' @@ -103,7 +106,7 @@ upon the filename, the contents of `untranslated-filesystem-list' and If the file exists: `undecided' If the file does not exist: default-buffer-file-coding-system -If COMMAND is `write-region', the coding system is chosen based upon +If operation is `write-region', the coding system is chosen based upon the value of `buffer-file-coding-system' and `buffer-file-type'. If `buffer-file-coding-system' is non-nil, its value is used. If it is nil and `buffer-file-type' is t, the coding system is `no-conversion'. @@ -126,6 +129,13 @@ set to the appropriate coding system, and the value of (undecided nil) (undecided-unix nil)) (cond ((eq op 'insert-file-contents) (setq target (nth 1 command)) + ;; If TARGET is a cons cell, it has the form (FILENAME . BUFFER), + ;; where BUFFER is a buffer into which the file was already read, + ;; but its contents were not yet decoded. (This form of the + ;; arguments is used, e.g., in arc-mode.el.) This function + ;; doesn't care about the contents, it only looks at the file's + ;; name, which is the CAR of the cons cell. + (if (consp target) (setq target (car target))) ;; First check for a file name that indicates ;; it is truly binary. (setq binary (find-buffer-file-type target)) |