diff options
| author | Eli Zaretskii | 2000-10-27 19:24:25 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2000-10-27 19:24:25 +0000 |
| commit | d71d711415e9b18383adb82b2d890eac95b82bdf (patch) | |
| tree | ec37f75f7976a3db4b031beb63f15c0608207b15 | |
| parent | f9d80af3ec8edecd6c89ce256e71309c1a4336ef (diff) | |
| download | emacs-d71d711415e9b18383adb82b2d890eac95b82bdf.tar.gz emacs-d71d711415e9b18383adb82b2d890eac95b82bdf.zip | |
(find-file-not-found-set-buffer-file-coding-system):
Don't call find-buffer-file-type-coding-system. Instead, just
set eol-type to -unix if inhibit-eol-conversion is in effect, or
if the file is on an untranslated filesystem.
(add-untranslated-filesystem): Use "D" instead of "f" inside
interactive.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/dos-w32.el | 19 |
2 files changed, 23 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ba2dc59c30..da199782251 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2000-10-27 Eli Zaretskii <eliz@is.elta.co.il> | ||
| 2 | |||
| 3 | * dos-w32.el (find-file-not-found-set-buffer-file-coding-system): | ||
| 4 | Don't call find-buffer-file-type-coding-system. Instead, just | ||
| 5 | set eol-type to -unix if inhibit-eol-conversion is in effect, or | ||
| 6 | if the file is on an untranslated filesystem. | ||
| 7 | (add-untranslated-filesystem): Use "D" instead of "f" inside | ||
| 8 | interactive. | ||
| 9 | |||
| 1 | 2000-10-27 Dave Love <fx@gnu.org> | 10 | 2000-10-27 Dave Love <fx@gnu.org> |
| 2 | 11 | ||
| 3 | * textmodes/refill.el (refill-late-fill-paragraph-function): New | 12 | * textmodes/refill.el (refill-late-fill-paragraph-function): New |
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index 83eb895dc80..901c7bac141 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el | |||
| @@ -177,10 +177,16 @@ set to the appropriate coding system, and the value of | |||
| 177 | (defun find-file-not-found-set-buffer-file-coding-system () | 177 | (defun find-file-not-found-set-buffer-file-coding-system () |
| 178 | (save-excursion | 178 | (save-excursion |
| 179 | (set-buffer (current-buffer)) | 179 | (set-buffer (current-buffer)) |
| 180 | (let* ((dummy-insert-op (list 'insert-file-contents (buffer-file-name))) | 180 | (let ((coding buffer-file-coding-system)) |
| 181 | (coding-system-pair | 181 | ;; buffer-file-coding-system is already set by |
| 182 | (find-buffer-file-type-coding-system dummy-insert-op))) | 182 | ;; find-operation-coding-system, which was called from |
| 183 | (setq buffer-file-coding-system (car coding-system-pair)) | 183 | ;; insert-file-contents. All that's left is to change |
| 184 | ;; the EOL conversion, if required by the user. | ||
| 185 | (when (and (null coding-system-for-read) | ||
| 186 | (or inhibit-eol-conversion | ||
| 187 | (untranslated-file-p (buffer-file-name)))) | ||
| 188 | (setq coding (coding-system-change-eol-conversion coding 0)) | ||
| 189 | (setq buffer-file-coding-system coding)) | ||
| 184 | (setq buffer-file-type (eq buffer-file-coding-system 'no-conversion))))) | 190 | (setq buffer-file-type (eq buffer-file-coding-system 'no-conversion))))) |
| 185 | 191 | ||
| 186 | ;;; To set the default coding system on new files. | 192 | ;;; To set the default coding system on new files. |
| @@ -233,7 +239,10 @@ CR/LF translation, and nil otherwise." | |||
| 233 | CR/LF translation. FILESYSTEM is a string containing the directory | 239 | CR/LF translation. FILESYSTEM is a string containing the directory |
| 234 | prefix corresponding to the filesystem. For example, for a Unix | 240 | prefix corresponding to the filesystem. For example, for a Unix |
| 235 | filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"." | 241 | filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"." |
| 236 | (interactive "fUntranslated file system: ") | 242 | ;; We use "D", not "f", to avoid confusing the user: "f" prompts |
| 243 | ;; with a directory, but RET returns the current buffer's file, not | ||
| 244 | ;; its directory. | ||
| 245 | (interactive "DUntranslated file system: ") | ||
| 237 | (let ((fs (untranslated-canonical-name filesystem))) | 246 | (let ((fs (untranslated-canonical-name filesystem))) |
| 238 | (if (member fs untranslated-filesystem-list) | 247 | (if (member fs untranslated-filesystem-list) |
| 239 | untranslated-filesystem-list | 248 | untranslated-filesystem-list |