Mercurial > hg > xemacs-beta
diff lisp/vm/vm-startup.el @ 26:441bb1e64a06 r19-15b96
Import from CVS: tag r19-15b96
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:51:32 +0200 |
parents | 4103f0995bd7 |
children | ec9a17fef872 |
line wrap: on
line diff
--- a/lisp/vm/vm-startup.el Mon Aug 13 08:51:05 2007 +0200 +++ b/lisp/vm/vm-startup.el Mon Aug 13 08:51:32 2007 +0200 @@ -64,36 +64,42 @@ (enable-local-variables nil) ;; for XEmacs/Mule (overriding-file-coding-system 'no-conversion)) - (vm-unsaved-message "Reading %s..." file) + (message "Reading %s..." file) (prog1 (find-file-noselect file) ;; update folder history (let ((item (or folder vm-primary-inbox))) (if (not (equal item (car vm-folder-history))) (setq vm-folder-history (cons item vm-folder-history)))) - (vm-unsaved-message "Reading %s... done" file)))))))) + (message "Reading %s... done" file)))))))) (set-buffer folder-buffer) ;; for XEmacs/MULE ;; ;; If the file coding system is not a no-conversion variant, ;; make it so by encoding all the text, then setting ;; the file coding system and decoding it. - ;; This is only possible if a file is visited and vm-mode + ;; This is only possible if a file is visited and then vm-mode ;; is run on it afterwards. (defvar file-coding-system) - (if (and (fboundp 'get-coding-system) - (not (eq file-coding-system + (if (and (vm-xemacs-mule-p) + (not (eq (get-coding-system file-coding-system) (get-coding-system 'no-conversion-unix))) - (not (eq file-coding-system + (not (eq (get-coding-system file-coding-system) (get-coding-system 'no-conversion-dos))) - (not (eq file-coding-system + (not (eq (get-coding-system file-coding-system) (get-coding-system 'no-conversion-mac))) - (not (eq file-coding-system + (not (eq (get-coding-system file-coding-system) (get-coding-system 'binary)))) - (progn - (encode-coding-region (point-min) (point-max) file-coding-system) - (set-file-coding-system 'no-conversion nil) - (decode-coding-region (point-min) (point-max) file-coding-system))) + (let ((buffer-read-only nil) + (omodified (buffer-modified-p))) + (unwind-protect + (progn + (encode-coding-region (point-min) (point-max) + file-coding-system) + (set-file-coding-system 'no-conversion nil) + (decode-coding-region (point-min) (point-max) + file-coding-system)) + (set-buffer-modified-p omodified)))) (vm-check-for-killed-summary) (vm-check-for-killed-presentation) ;; If the buffer's not modified then we know that there can be no @@ -221,7 +227,7 @@ (not vm-block-new-mail) (not vm-folder-read-only)) (progn - (vm-unsaved-message "Checking for new mail for %s..." + (message "Checking for new mail for %s..." (or buffer-file-name (buffer-name))) (if (and (vm-get-spooled-mail t) (vm-assimilate-new-messages t)) (progn @@ -269,7 +275,7 @@ (defun vm-mode (&optional read-only) "Major mode for reading mail. -This is VM 6.15. +This is VM 6.16. Commands: h - summarize folder contents