Mercurial > hg > xemacs-beta
comparison lisp/vm/vm-startup.el @ 110:fe104dbd9147 r20-1b7
Import from CVS: tag r20-1b7
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:19:45 +0200 |
parents | 360340f9fd5f |
children | 8619ce7e4c50 |
comparison
equal
deleted
inserted
replaced
109:e183fc049578 | 110:fe104dbd9147 |
---|---|
78 ;; If the file coding system is not a no-conversion variant, | 78 ;; If the file coding system is not a no-conversion variant, |
79 ;; make it so by encoding all the text, then setting | 79 ;; make it so by encoding all the text, then setting |
80 ;; the file coding system and decoding it. | 80 ;; the file coding system and decoding it. |
81 ;; This is only possible if a file is visited and then vm-mode | 81 ;; This is only possible if a file is visited and then vm-mode |
82 ;; is run on it afterwards. | 82 ;; is run on it afterwards. |
83 (defvar file-coding-system) | 83 (defvar buffer-file-coding-system) |
84 (if (and (vm-xemacs-mule-p) | 84 (if (and (vm-xemacs-mule-p) |
85 (not (eq (get-coding-system file-coding-system) | 85 (not (eq (get-coding-system buffer-file-coding-system) |
86 (get-coding-system 'no-conversion-unix))) | 86 (get-coding-system 'no-conversion-unix))) |
87 (not (eq (get-coding-system file-coding-system) | 87 (not (eq (get-coding-system buffer-file-coding-system) |
88 (get-coding-system 'no-conversion-dos))) | 88 (get-coding-system 'no-conversion-dos))) |
89 (not (eq (get-coding-system file-coding-system) | 89 (not (eq (get-coding-system buffer-file-coding-system) |
90 (get-coding-system 'no-conversion-mac))) | 90 (get-coding-system 'no-conversion-mac))) |
91 (not (eq (get-coding-system file-coding-system) | 91 (not (eq (get-coding-system buffer-file-coding-system) |
92 (get-coding-system 'binary)))) | 92 (get-coding-system 'binary)))) |
93 (let ((buffer-read-only nil) | 93 (let ((buffer-read-only nil) |
94 (omodified (buffer-modified-p))) | 94 (omodified (buffer-modified-p))) |
95 (unwind-protect | 95 (unwind-protect |
96 (progn | 96 (progn |
97 (encode-coding-region (point-min) (point-max) | 97 (encode-coding-region (point-min) (point-max) |
98 file-coding-system) | 98 buffer-file-coding-system) |
99 (set-file-coding-system 'no-conversion nil) | 99 (set-buffer-file-coding-system 'no-conversion nil) |
100 (decode-coding-region (point-min) (point-max) | 100 (decode-coding-region (point-min) (point-max) |
101 file-coding-system)) | 101 buffer-file-coding-system)) |
102 (set-buffer-modified-p omodified)))) | 102 (set-buffer-modified-p omodified)))) |
103 (vm-check-for-killed-summary) | 103 (vm-check-for-killed-summary) |
104 (vm-check-for-killed-presentation) | 104 (vm-check-for-killed-presentation) |
105 ;; If the buffer's not modified then we know that there can be no | 105 ;; If the buffer's not modified then we know that there can be no |
106 ;; messages in the folder that are not on disk. | 106 ;; messages in the folder that are not on disk. |