Mercurial > hg > xemacs-beta
comparison lisp/vm/vm-startup.el @ 140:585fb297b004 r20-2b4
Import from CVS: tag r20-2b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:32:43 +0200 |
parents | b980b6286996 |
children | 2af401a6ecca |
comparison
equal
deleted
inserted
replaced
139:2b5203979d01 | 140:585fb297b004 |
---|---|
61 (expand-file-name vm-folder-directory)) | 61 (expand-file-name vm-folder-directory)) |
62 default-directory)) | 62 default-directory)) |
63 (inhibit-local-variables t) | 63 (inhibit-local-variables t) |
64 (enable-local-variables nil) | 64 (enable-local-variables nil) |
65 ;; for XEmacs/Mule | 65 ;; for XEmacs/Mule |
66 (overriding-file-coding-system 'no-conversion)) | 66 (coding-system-for-read 'no-conversion)) |
67 (message "Reading %s..." file) | 67 (message "Reading %s..." file) |
68 (prog1 (find-file-noselect file) | 68 (prog1 (find-file-noselect file) |
69 ;; update folder history | 69 ;; update folder history |
70 (let ((item (or folder vm-primary-inbox))) | 70 (let ((item (or folder vm-primary-inbox))) |
71 (if (not (equal item (car vm-folder-history))) | 71 (if (not (equal item (car vm-folder-history))) |
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. |
274 (put 'vm-mode 'mode-class 'special) | 274 (put 'vm-mode 'mode-class 'special) |
275 | 275 |
276 (defun vm-mode (&optional read-only) | 276 (defun vm-mode (&optional read-only) |
277 "Major mode for reading mail. | 277 "Major mode for reading mail. |
278 | 278 |
279 This is VM 6.29. | 279 This is VM 6.30. |
280 | 280 |
281 Commands: | 281 Commands: |
282 h - summarize folder contents | 282 h - summarize folder contents |
283 C-t - toggle threads display | 283 C-t - toggle threads display |
284 | 284 |