Mercurial > hg > xemacs-beta
comparison lisp/code-files.el @ 416:ebe98a74bd68 r21-2-16
Import from CVS: tag r21-2-16
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:22:23 +0200 |
parents | da8ed4261e83 |
children | 95016f13131a |
comparison
equal
deleted
inserted
replaced
415:a27f76b40c83 | 416:ebe98a74bd68 |
---|---|
33 ;; This file was derived from the former mule-files.el which has been removed | 33 ;; This file was derived from the former mule-files.el which has been removed |
34 ;; as of XEmacs 21.2.15. | 34 ;; as of XEmacs 21.2.15. |
35 | 35 |
36 ;;; Code: | 36 ;;; Code: |
37 | 37 |
38 (setq-default buffer-file-coding-system 'no-conversion) | 38 (setq-default buffer-file-coding-system 'raw-text) |
39 (put 'buffer-file-coding-system 'permanent-local t) | 39 (put 'buffer-file-coding-system 'permanent-local t) |
40 | 40 |
41 (define-obsolete-variable-alias | 41 (define-obsolete-variable-alias |
42 'file-coding-system | 42 'file-coding-system |
43 'buffer-file-coding-system) | 43 'buffer-file-coding-system) |
285 (or (and (not elc) coding-system-for-read) ; prefer for source file | 285 (or (and (not elc) coding-system-for-read) ; prefer for source file |
286 ;; find magic-cookie | 286 ;; find magic-cookie |
287 (save-excursion | 287 (save-excursion |
288 (set-buffer (get-buffer-create " *load*")) | 288 (set-buffer (get-buffer-create " *load*")) |
289 (erase-buffer) | 289 (erase-buffer) |
290 (let ((coding-system-for-read 'no-conversion)) | 290 (let ((coding-system-for-read 'raw-text)) |
291 (insert-file-contents path nil 1 3001)) | 291 (insert-file-contents path nil 1 3001)) |
292 (find-coding-system-magic-cookie)) | 292 (find-coding-system-magic-cookie)) |
293 (if elc | 293 (if elc |
294 ;; if reading a byte-compiled file and we didn't find | 294 ;; if reading a byte-compiled file and we didn't find |
295 ;; a coding-system magic cookie, then use `binary'. | 295 ;; a coding-system magic cookie, then use `binary'. |
382 1. `coding-system-for-read', if non-nil. | 382 1. `coding-system-for-read', if non-nil. |
383 2. The result of `insert-file-contents-pre-hook', if non-nil. | 383 2. The result of `insert-file-contents-pre-hook', if non-nil. |
384 3. The matching value for this filename from | 384 3. The matching value for this filename from |
385 `file-coding-system-alist', if any. | 385 `file-coding-system-alist', if any. |
386 4. `buffer-file-coding-system-for-read', if non-nil. | 386 4. `buffer-file-coding-system-for-read', if non-nil. |
387 5. The coding system 'no-conversion. | 387 5. The coding system 'raw-text. |
388 | 388 |
389 If a local value for `buffer-file-coding-system' in the current buffer | 389 If a local value for `buffer-file-coding-system' in the current buffer |
390 does not exist, it is set to the coding system which was actually used | 390 does not exist, it is set to the coding system which was actually used |
391 for reading. | 391 for reading. |
392 | 392 |
411 ;; #3. | 411 ;; #3. |
412 (find-file-coding-system-for-read-from-filename filename) | 412 (find-file-coding-system-for-read-from-filename filename) |
413 ;; #4. | 413 ;; #4. |
414 buffer-file-coding-system-for-read | 414 buffer-file-coding-system-for-read |
415 ;; #5. | 415 ;; #5. |
416 'no-conversion)) | 416 'raw-text)) |
417 (if (consp coding-system) | 417 (if (consp coding-system) |
418 (setq return-val coding-system) | 418 (setq return-val coding-system) |
419 (if (null (find-coding-system coding-system)) | 419 (if (null (find-coding-system coding-system)) |
420 (progn | 420 (progn |
421 (message | 421 (message |