comparison lisp/vm/vm-startup.el @ 136:b980b6286996 r20-2b2

Import from CVS: tag r20-2b2
author cvs
date Mon, 13 Aug 2007 09:31:12 +0200
parents 869e1851236b
children 585fb297b004
comparison
equal deleted inserted replaced
135:4636a6841cd6 136:b980b6286996
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 (coding-system-for-read 'no-conversion)) 66 (overriding-file-coding-system '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 buffer-file-coding-system) 83 (defvar file-coding-system)
84 (if (and vm-xemacs-mule-p 84 (if (and vm-xemacs-mule-p
85 (not (eq (get-coding-system buffer-file-coding-system) 85 (not (eq (get-coding-system file-coding-system)
86 (get-coding-system 'no-conversion-unix))) 86 (get-coding-system 'no-conversion-unix)))
87 (not (eq (get-coding-system buffer-file-coding-system) 87 (not (eq (get-coding-system file-coding-system)
88 (get-coding-system 'no-conversion-dos))) 88 (get-coding-system 'no-conversion-dos)))
89 (not (eq (get-coding-system buffer-file-coding-system) 89 (not (eq (get-coding-system file-coding-system)
90 (get-coding-system 'no-conversion-mac))) 90 (get-coding-system 'no-conversion-mac)))
91 (not (eq (get-coding-system buffer-file-coding-system) 91 (not (eq (get-coding-system 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 buffer-file-coding-system) 98 file-coding-system)
99 (set-buffer-file-coding-system 'no-conversion nil) 99 (set-file-coding-system 'no-conversion nil)
100 (decode-coding-region (point-min) (point-max) 100 (decode-coding-region (point-min) (point-max)
101 buffer-file-coding-system)) 101 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.27. 279 This is VM 6.29.
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
1009 ;; see what the user had loaded 1009 ;; see what the user had loaded
1010 'features 1010 'features
1011 ) 1011 )
1012 nil 1012 nil
1013 nil 1013 nil
1014 "Please change the Subject header to a concise bug description.\nRemember to cover the basics, that is, what you expected to\nhappen and what in fact did happen. Please remove these instructions from your message.") 1014 "Please change the Subject header to a concise bug description.\nRemember to cover the basics, that is, what you expected to\nhappen and what in fact did happen. Please remove these\ninstructions from your message.")
1015 (save-excursion 1015 (save-excursion
1016 (goto-char (point-min)) 1016 (goto-char (point-min))
1017 (mail-position-on-field "Subject") 1017 (mail-position-on-field "Subject")
1018 (beginning-of-line) 1018 (beginning-of-line)
1019 (delete-region (point) (progn (forward-line) (point))) 1019 (delete-region (point) (progn (forward-line) (point)))
1053 )))) 1053 ))))
1054 1054
1055 (defun vm-session-initialization () 1055 (defun vm-session-initialization ()
1056 (vm-note-emacs-version) 1056 (vm-note-emacs-version)
1057 (vm-check-emacs-version) 1057 (vm-check-emacs-version)
1058 ;(vm-set-debug-flags) 1058 ;; (vm-set-debug-flags)
1059 ;; If this is the first time VM has been run in this Emacs session, 1059 ;; If this is the first time VM has been run in this Emacs session,
1060 ;; do some necessary preparations. 1060 ;; do some necessary preparations.
1061 (if (or (not (boundp 'vm-session-beginning)) 1061 (if (or (not (boundp 'vm-session-beginning))
1062 vm-session-beginning) 1062 vm-session-beginning)
1063 (progn 1063 (progn