| 91 | | "Choose a coding system for a file operation. |
|---|
| 92 | | If COMMAND is `insert-file-contents', the coding system is chosen based |
|---|
| 93 | | upon the filename, the contents of `untranslated-filesystem-list' and |
|---|
| 94 | | `file-name-buffer-file-type-alist', and whether the file exists: |
|---|
| | 91 | "Choose a coding system for a file operation in COMMAND. |
|---|
| | 92 | COMMAND is a list that specifies the operation, and I/O primitive as its |
|---|
| | 93 | CAR, and the arguments that might be given to that operation as its CDR. |
|---|
| | 94 | If operation is `insert-file-contents', the coding system is chosen based |
|---|
| | 95 | upon the filename (the CAR of the arguments beyond the operation), the contents |
|---|
| | 96 | of `untranslated-filesystem-list' and `file-name-buffer-file-type-alist', |
|---|
| | 97 | and whether the file exists: |
|---|
| | 132 | ;; If TARGET is a cons cell, it has the form (FILENAME . BUFFER), |
|---|
| | 133 | ;; where BUFFER is a buffer into which the file was already read, |
|---|
| | 134 | ;; but its contents were not yet decoded. (This form of the |
|---|
| | 135 | ;; arguments is used, e.g., in arc-mode.el.) This function |
|---|
| | 136 | ;; doesn't care about the contents, it only looks at the file's |
|---|
| | 137 | ;; name, which is the CAR of the cons cell. |
|---|
| | 138 | (if (consp target) (setq target (car target))) |
|---|