*** dist/vm-imap.el.dist Sun Jan 17 17:42:33 1999 --- vm-imap.el Mon Jan 25 22:01:09 1999 *************** *** 21,23 **** (progn ! (define-error 'vm-imap-protocol-error "IMAP protocl error")) (put 'vm-imap-protocol-error 'error-conditions --- 21,23 ---- (progn ! (define-error 'vm-imap-protocol-error "IMAP protocol error")) (put 'vm-imap-protocol-error 'error-conditions *************** *** 430,434 **** (erase-buffer) ! ;; Tell XEmacs/MULE not to mess with the text. ! (and vm-xemacs-mule-p ! (set-buffer-file-coding-system 'binary t)) (insert "starting IMAP session " (current-time-string) "\n") --- 430,434 ---- (erase-buffer) ! ;; Tell MULE not to mess with the text. ! (if (or vm-xemacs-mule-p vm-fsfemacs-mule-p) ! (set-buffer-file-coding-system 'binary t)) (insert "starting IMAP session " (current-time-string) "\n") *** dist/vm-mime.el.dist Sun Jan 17 17:42:34 1999 --- vm-mime.el Thu Jan 28 23:22:18 1999 *************** *** 40,43 **** (defun vm-mm-layout-cache (e) (aref e 11)) ;; if display of MIME part fails, error string will be here. ! (defun vm-mm-layout-display-error (e) (aref e 12)) --- 40,46 ---- (defun vm-mm-layout-cache (e) (aref e 11)) + (defun vm-mm-layout-message-symbol (e) (aref e 12)) + (defun vm-mm-layout-message (e) + (symbol-value (vm-mm-layout-message-symbol e))) ;; if display of MIME part fails, error string will be here. ! (defun vm-mm-layout-display-error (e) (aref e 13)) *************** *** 46,48 **** (defun vm-set-mm-layout-cache (e c) (aset e 11 c)) ! (defun vm-set-mm-layout-display-error (e c) (aset e 12 c)) --- 49,56 ---- (defun vm-set-mm-layout-cache (e c) (aset e 11 c)) ! (defun vm-set-mm-layout-display-error (e c) (aset e 13 c)) ! ! (defun vm-mime-make-message-symbol (m) ! (let ((s (make-symbol "<>"))) ! (set s m) ! s )) *************** *** 175,176 **** --- 183,187 ---- (let* ((binary-process-output t) ; any text already has CRLFs + ;; use binary coding system in FSF Emacs/MULE + (coding-system-for-read 'binary) + (coding-system-for-write 'binary) (status (apply 'vm-run-command-on-region *************** *** 465,466 **** --- 476,481 ---- (let* ((binary-process-output t) ; any text already has CRLFs + ;; use binary coding system in FSF Emacs/MULE + (coding-system-for-read 'binary) + (coding-system-for-write 'binary) + (process-coding-system-alist '(("." . binary))) (status (apply 'vm-run-command-on-region *************** *** 585,587 **** (goto-char start) ! (insert "=?" charset "?" (if q-encoding "Q" "B") "?"))) (setq start pos))))) --- 600,603 ---- (goto-char start) ! (insert "=?" charset "?" (if q-encoding "Q" "B") "?") ! (setq pos (+ pos (- (point) start))))) (setq start pos))))) *************** *** 694,696 **** (vm-text-end-of m) ! nil nil nil ))) ((null type) --- 710,714 ---- (vm-text-end-of m) ! nil nil ! (vm-mime-make-message-symbol m) ! nil ))) ((null type) *************** *** 705,707 **** (vm-marker (point-max)) ! nil nil nil )) ((null (string-match "[^/ ]+/[^/ ]+" (car type))) --- 723,727 ---- (vm-marker (point-max)) ! nil nil ! (vm-mime-make-message-symbol m) ! nil )) ((null (string-match "[^/ ]+/[^/ ]+" (car type))) *************** *** 738,740 **** c-t-e))) ! nil nil ))) (t --- 758,762 ---- c-t-e))) ! nil ! (vm-mime-make-message-symbol m) ! nil ))) (t *************** *** 749,751 **** (vm-marker (point-max)) ! nil nil nil )))) (setq p (cdr type) --- 771,775 ---- (vm-marker (point-max)) ! nil nil ! (vm-mime-make-message-symbol m) ! nil )))) (setq p (cdr type) *************** *** 796,798 **** (nreverse multipart-list) ! nil nil ))))))) --- 820,823 ---- (nreverse multipart-list) ! (vm-mime-make-message-symbol m) ! nil ))))))) *************** *** 828,830 **** text-end ! nil nil nil))))) --- 853,857 ---- text-end ! nil nil ! (vm-mime-make-message-symbol m) ! nil))))) *************** *** 899,903 **** (setq scroll-in-place nil) ! (and vm-xemacs-mule-p ! (set-buffer-file-coding-system 'binary t)) ! (cond (vm-fsfemacs-p ;; need to do this outside the let because --- 926,930 ---- (setq scroll-in-place nil) ! (if (or vm-xemacs-mule-p vm-fsfemacs-mule-p) ! (set-buffer-file-coding-system 'binary t)) ! (cond ((and vm-fsfemacs-p (not vm-fsfemacs-mule-p)) ;; need to do this outside the let because *************** *** 981,984 **** (goto-char (point-min)) ! (if vm-xemacs-mule-p ! (let ((charsets (delq 'ascii (charsets-in-region beg end)))) (cond ((null charsets) --- 1008,1011 ---- (goto-char (point-min)) ! (if (or vm-xemacs-mule-p vm-fsfemacs-mule-p) ! (let ((charsets (delq 'ascii (vm-charsets-in-region beg end)))) (cond ((null charsets) *************** *** 1126,1127 **** --- 1153,1155 ---- nil + (vm-mm-layout-message layout) nil)))) *************** *** 1473,1475 **** ;; this is a text type. ! (if vm-xemacs-mule-p (if (vm-mime-text-type-layout-p layout) --- 1501,1503 ---- ;; this is a text type. ! (if (or vm-xemacs-mule-p vm-fsfemacs-mule-p) (if (vm-mime-text-type-layout-p layout) *************** *** 1656,1658 **** (setq vm-folder-type vm-default-folder-type) ! (vm-mime-burst-layout layout nil) (vm-save-buffer-excursion --- 1684,1691 ---- (setq vm-folder-type vm-default-folder-type) ! (let ((ident-header nil)) ! (if vm-digest-identifier-header-format ! (setq ident-header (vm-summary-sprintf ! vm-digest-identifier-header-format ! (vm-mm-layout-message layout)))) ! (vm-mime-burst-layout layout ident-header)) (vm-save-buffer-excursion *************** *** 2130,2132 **** ;; this is a text type. ! (if vm-xemacs-mule-p (if (vm-mime-text-type-layout-p layout) --- 2163,2165 ---- ;; this is a text type. ! (if (or vm-xemacs-mule-p vm-fsfemacs-mule-p) (if (vm-mime-text-type-layout-p layout) *************** *** 2166,2170 **** (eq vm-mutable-windows t))) ;; Tell DOS/Windows NT whether the input is binary (binary-process-input ! (not (vm-mime-text-type-layout-p layout)))) (call-process-region (point-min) (point-max) --- 2199,2208 ---- (eq vm-mutable-windows t))) + (process-coding-system-alist + (if (vm-mime-text-type-layout-p layout) + nil + '(("." . binary)))) ;; Tell DOS/Windows NT whether the input is binary (binary-process-input ! (not ! (vm-mime-text-type-layout-p layout)))) (call-process-region (point-min) (point-max) *************** *** 2324,2326 **** (vm-string-assoc name vm-mime-mule-charset-to-coding-alist)) ! ((and vm-fsfemacs-mule-p (eq window-system 'x)) (vm-string-assoc name vm-mime-mule-charset-to-coding-alist)) --- 2362,2364 ---- (vm-string-assoc name vm-mime-mule-charset-to-coding-alist)) ! ((and vm-fsfemacs-mule-p (memq window-system '(x win32))) (vm-string-assoc name vm-mime-mule-charset-to-coding-alist)) *************** *** 2382,2384 **** The file is not inserted into the buffer and MIME encoded until ! you execute vm-mail-send or vm-mail-send-and-exit. A visible tag indicating the existence of the attachment is placed in the --- 2420,2422 ---- The file is not inserted into the buffer and MIME encoded until ! you execute `vm-mail-send' or `vm-mail-send-and-exit'. A visible tag indicating the existence of the attachment is placed in the *************** *** 2393,2395 **** ignored for other types. Optional fourth argument DESCRIPTION ! should be a one line description of the file. --- 2431,2434 ---- ignored for other types. Optional fourth argument DESCRIPTION ! should be a one line description of the file. Nil means include ! no description. *************** *** 2458,2460 **** header section at the top. For files without MIME headers, you ! should use vm-mime-attach-file to attach such a file." (interactive --- 2497,2499 ---- header section at the top. For files without MIME headers, you ! should use vm-mime-attach-file to attach the file." (interactive *************** *** 2485,2486 **** --- 2524,2671 ---- + (defun vm-mime-attach-buffer (buffer type &optional charset description) + "Attach a buffer to a VM composition buffer to be sent along with + the message. + + The buffer contents are not inserted into the composition + buffer and MIME encoded until you execute `vm-mail-send' or + `vm-mail-send-and-exit'. A visible tag indicating the existence + of the attachment is placed in the composition buffer. You + can move the attachment around or remove it entirely with + normal text editing commands. If you remove the attachment + tag, the attachment will not be sent. + + First argument, BUFFER, is the buffer or name of the buffer to + attach. Second argument, TYPE, is the MIME Content-Type of the + file. Optional third argument CHARSET is the character set of + the attached document. This argument is only used for text + types, and it is ignored for other types. Optional fourth + argument DESCRIPTION should be a one line description of the + file. Nil means include no description. + + When called interactively all arguments are read from the + minibuffer. + + This command is for attaching files that do not have a MIME + header section at the top. For files with MIME headers, you + should use vm-mime-attach-mime-file to attach such a file. VM + will extract the content type information from the headers in + this case and not prompt you for it in the minibuffer." + (interactive + ;; protect value of last-command and this-command + (let ((last-command last-command) + (this-command this-command) + (charset nil) + description file default-type type buffer buffer-name) + (if (null vm-send-using-mime) + (error "MIME attachments disabled, set vm-send-using-mime non-nil to enable.")) + (setq buffer-name (read-buffer "Attach buffer: " nil t) + default-type (or (vm-mime-default-type-from-filename buffer-name) + "application/octet-stream") + type (completing-read + (format "Content type (default %s): " + default-type) + vm-mime-type-completion-alist) + type (if (> (length type) 0) type default-type)) + (if (vm-mime-types-match "text" type) + (setq charset (completing-read "Character set (default US-ASCII): " + vm-mime-charset-completion-alist) + charset (if (> (length charset) 0) charset))) + (setq description (read-string "One line description: ")) + (if (string-match "^[ \t]*$" description) + (setq description nil)) + (list buffer-name type charset description))) + (if (null (setq buffer (get-buffer buffer))) + (error "Buffer %s does not exist." buffer)) + (if (null vm-send-using-mime) + (error "MIME attachments disabled, set vm-send-using-mime non-nil to enable.")) + (and charset (setq charset (list (concat "charset=" charset)))) + (and description (setq description (vm-mime-scrub-description description))) + (vm-mime-attach-object buffer type charset description nil)) + + (defun vm-mime-attach-message (message &optional description) + "Attach a message from a folder to a VM composition buffer + to be sent along with the message. + + The message is not inserted into the buffer and MIME encoded until + you execute `vm-mail-send' or `vm-mail-send-and-exit'. A visible tag + indicating the existence of the attachment is placed in the + composition buffer. You can move the attachment around or remove + it entirely with normal text editing commands. If you remove the + attachment tag, the attachment will not be sent. + + First argument, MESSAGE, is a VM message struct. When called + interactively a message number read. The message will come from + the parent folder of this composition. If the composition has no + parent, the name of a folder will be read from the minibuffer + before the message number is read. + + If this command is invoked with a prefix argument, the name of a + folder is read and that folder is used instead of the parent + folder of the composition. + + Optional second argument DESCRIPTION is a one-line description of + the message being attached. This is also read from the + minibuffer if the command is run interactively." + (interactive + ;; protect value of last-command and this-command + (let ((last-command last-command) + (this-command this-command) + (result 0) + mp default prompt description folder) + (if (null vm-send-using-mime) + (error "MIME attachments disabled, set vm-send-using-mime non-nil to enable.")) + (cond ((or current-prefix-arg (null vm-mail-buffer) + (not (buffer-live-p vm-mail-buffer))) + (let ((dir (if vm-folder-directory + (expand-file-name vm-folder-directory) + default-directory)) + file + (last-command last-command) + (this-command this-command)) + (setq file (read-file-name "Yank from folder: " dir nil t)) + (save-excursion + (set-buffer + (let ((coding-system-for-read 'binary)) + (find-file-noselect file))) + (setq folder (current-buffer)) + (vm-mode)))) + (t + (setq folder vm-mail-buffer))) + (save-excursion + (set-buffer folder) + (setq default (and vm-message-pointer + (vm-number-of (car vm-message-pointer))) + prompt (if default + (format "Yank message number: (default %s) " + default) + "Yank message number: ")) + (while (zerop result) + (setq result (read-string prompt)) + (and (string= result "") default (setq result default)) + (setq result (string-to-int result))) + (if (null (setq mp (nthcdr (1- result) vm-message-list))) + (error "No such message."))) + (setq description (read-string "Description: ")) + (if (string-match "^[ \t]*$" description) + (setq description nil)) + (list (car mp) description))) + (if (null vm-send-using-mime) + (error "MIME attachments disabled, set vm-send-using-mime non-nil to enable.")) + (let* ((buf (generate-new-buffer "*attached message*")) + (m (vm-real-message-of message)) + (folder (vm-buffer-of m))) + (save-excursion + (set-buffer buf) + (vm-insert-region-from-buffer folder (vm-headers-of m) + (vm-text-end-of m)) + (goto-char (point-min)) + (vm-reorder-message-headers nil nil "\\(X-VM-\\|Status:\\)")) + (and description (setq description + (vm-mime-scrub-description description))) + (vm-mime-attach-object buf "message/rfc822" nil description nil) + (add-hook 'kill-buffer-hook + (list 'lambda () + (list 'if (list 'eq (current-buffer) '(current-buffer)) + (list 'kill-buffer buf)))))) + (defun vm-mime-attach-object (object type params description mimed) *************** *** 2523,2526 **** (put-text-property start end 'vm-mime-disposition disposition) ! (put-text-property start end 'vm-mime-encoded mimed) ! (put-text-property start end 'vm-mime-object object)) (vm-xemacs-p --- 2708,2710 ---- (put-text-property start end 'vm-mime-disposition disposition) ! (put-text-property start end 'vm-mime-encoded mimed)) (vm-xemacs-p *************** *** 2726,2730 **** (interactive) ! (cond (vm-xemacs-mule-p ! (vm-mime-xemacs-encode-composition)) ! (vm-xemacs-p (vm-mime-xemacs-encode-composition)) --- 2910,2912 ---- (interactive) ! (cond (vm-xemacs-p (vm-mime-xemacs-encode-composition)) *** dist/vm-misc.el.dist Tue Dec 15 09:10:22 1998 --- vm-misc.el Thu Jan 28 23:39:01 1999 *************** *** 195,199 **** (setq buffer-file-type nil) ! ;; Tell XEmacs/MULE to pick the correct newline conversion. ! (and vm-xemacs-mule-p ! (set-file-coding-system 'no-conversion nil)) (write-region (point-min) (point-max) where t 'quiet)) --- 195,199 ---- (setq buffer-file-type nil) ! ;; Tell MULE to pick the correct newline conversion. ! (if (or vm-xemacs-mule-p vm-fsfemacs-mule-p) ! (set-file-coding-system 'no-conversion nil)) (write-region (point-min) (point-max) where t 'quiet)) *************** *** 713 **** --- 713,723 ---- (fset 'vm-char-to-int 'identity)) + + (cond ((fboundp 'charsets-in-region) + (fset 'vm-charsets-in-region 'charsets-in-region)) + ((fboundp 'find-charset-region) + (fset 'vm-charsets-in-region 'find-charset-region))) + + (defun vm-collapse-whitespace () + (goto-char (point-min)) + (while (re-search-forward "[ \t\n]+" nil 0) + (replace-match " " t t))) *** dist/vm-mouse.el.dist Tue Dec 15 09:10:23 1998 --- vm-mouse.el Mon Jan 25 22:01:17 1999 *************** *** 240,243 **** (setq buffer-file-type nil) ! (and vm-xemacs-mule-p ! (set-buffer-file-coding-system 'no-conversion nil)) (write-region (point-min) (point-max) --- 240,243 ---- (setq buffer-file-type nil) ! (if (or vm-xemacs-mule-p vm-fsfemacs-mule-p) ! (set-buffer-file-coding-system 'no-conversion nil)) (write-region (point-min) (point-max) *************** *** 281,282 **** --- 281,285 ---- (let ((tempfile nil) + ;; use binary coding system in FSF Emacs/MULE + (coding-system-for-read 'binary) + (coding-system-for-write 'binary) ;; for DOS/Windows command to tell it that its input is *** dist/vm-pop.el.dist Sun Jan 17 17:42:36 1999 --- vm-pop.el Mon Jan 25 21:58:02 1999 *************** *** 390,394 **** (erase-buffer) ! ;; Tell XEmacs/MULE not to mess with the text. ! (and vm-xemacs-mule-p ! (set-buffer-file-coding-system 'binary t)) (insert "starting POP session " (current-time-string) "\n") --- 390,394 ---- (erase-buffer) ! ;; Tell MULE not to mess with the text. ! (if (or vm-xemacs-mule-p vm-fsfemacs-mule-p) ! (set-buffer-file-coding-system 'binary t)) (insert "starting POP session " (current-time-string) "\n") *** dist/vm-sort.el.dist Fri Apr 4 11:28:55 1997 --- vm-sort.el Thu Jan 28 17:57:44 1999 *************** *** 238,239 **** --- 238,247 ---- (setq subject (substring subject 0 (match-beginning 0)))) + (setq subject (vm-with-string-as-temp-buffer + subject + (function vm-collapse-whitespace))) + (if (and vm-subject-significant-chars + (natnump vm-subject-significant-chars) + (< vm-subject-significant-chars (length subject))) + (setq subject + (substring subject 0 vm-subject-significant-chars))) subject )) *** dist/vm-startup.el.dist Sun Jan 17 17:42:37 1999 --- vm-startup.el Fri Jan 29 00:09:12 1999 *************** *** 104,105 **** --- 104,120 ---- (set-buffer-modified-p omodified)))) + (if (and vm-fsfemacs-mule-p + (not (eq (coding-system-base buffer-file-coding-system) + (coding-system-base 'no-conversion))) + (not (eq (coding-system-base buffer-file-coding-system) + (coding-system-base 'binary)))) + (let ((buffer-read-only nil) + (omodified (buffer-modified-p))) + (unwind-protect + (progn + (encode-coding-region (point-min) (point-max) + buffer-file-coding-system) + (set-buffer-file-coding-system 'no-conversion nil) + (decode-coding-region (point-min) (point-max) + buffer-file-coding-system)) + (set-buffer-modified-p omodified)))) (vm-check-for-killed-summary) *************** *** 296,298 **** ! This is VM 6.64. --- 311,313 ---- ! This is VM 6.65. *************** *** 1145,1148 **** vm-version)) ! ((and vm-fsfemacs-p (= emacs-major-version 20)) ! (error "VM has not been ported to v20 Emacs. Running VM in this environment may trash your folders.")))) --- 1160,1165 ---- vm-version)) ! ((and vm-fsfemacs-p ! (= emacs-major-version 20) ! (< emacs-minor-version 3)) ! (error "VM must be run on Emacs 20.3 or a later v20 version.")))) *** dist/vm-vars.el.dist Sun Jan 17 17:42:38 1999 --- vm-vars.el Thu Jan 28 23:14:56 1999 *************** *** 155,157 **** \"preauth\" and \"login\". \"preauth\" causes VM to skip the ! authenication stage of the protocol with the assumption that the session was authenticated some externally way. The other --- 155,157 ---- \"preauth\" and \"login\". \"preauth\" causes VM to skip the ! authentication stage of the protocol with the assumption that the session was authenticated some externally way. The other *************** *** 232,234 **** warning message. You will be able to retrieved any skipped messages ! later by running 'vm-get-new-mail' interactively. --- 232,234 ---- warning message. You will be able to retrieved any skipped messages ! later by running `vm-get-new-mail' interactively. *************** *** 2021,2022 **** --- 2021,2035 ---- + (defvar vm-subject-significant-chars nil + "*Number of characters in the normalized message subject considered + significant in message threading and sorting. The normalized + subject is the contents of the Subject header after ignored + prefixes and suffixes have been removed and after consecutive + whitespace has been collapsed into single spaces. The first + `vm-subject-significant-chars' will be considered significant. + Characters beyond this point in the subject string will be + ignored. + + A nil value for this variable means all characters in the message + subject are significant.") + (defvar vm-mutable-windows pop-up-windows *************** *** 2883,2885 **** (define-key map "\C-c\C-a" 'vm-mime-attach-file) ! ;; (define-key map "\C-c\C-m" 'vm-mime-attach-mime-file) (define-key map "\C-c\C-y" 'vm-yank-message) --- 2896,2899 ---- (define-key map "\C-c\C-a" 'vm-mime-attach-file) ! (define-key map "\C-c\C-b" 'vm-mime-attach-buffer) ! (define-key map "\C-c\C-m" 'vm-mime-attach-message) (define-key map "\C-c\C-y" 'vm-yank-message) *************** *** 3398,3400 **** (defvar vm-url-regexp ! "\n]+\\)>\\|\\(\\(file\\|ftp\\|gopher\\|http\\|https\\|news\\|wais\\|www\\)://[^ \t\n\f\r\"<>|()]*[^ \t\n\f\r\"<>|.!?(){}]\\)\\|\\(mailto:[^ \t\n\f\r\"<>|()]*[^ \t\n\f\r\"<>|.!?(){}]\\)" "Regular expression that matches an absolute URL. --- 3412,3414 ---- (defvar vm-url-regexp ! "\n]+\\)>\\|\\(\\(file\\|ftp\\|gopher\\|http\\|https\\|news\\|wais\\|www\\)://[^ \t\n\f\r\"<>|()]*[^ \t\n\f\r\"<>|.!?(){}]\\)\\|\\(mailto:[^ \t\n\f\r\"<>|()]*[^ \t\n\f\r\"<>|.!?(){}]\\)\\|\\(file:/[^ \t\n\f\r\"<>|()]*[^ \t\n\f\r\"<>|.!?(){}]\\)" "Regular expression that matches an absolute URL. *************** *** 3527,3549 **** (make-variable-buffer-local 'vm-folder-garbage-alist) (defconst vm-mime-header-list '("MIME-Version:" "Content-")) (defconst vm-mime-mule-charset-to-coding-alist ! '( ! ("us-ascii" no-conversion) ! ("iso-8859-1" no-conversion) ! ("iso-8859-2" iso-8859-2) ! ("iso-8859-3" iso-8859-3) ! ("iso-8859-4" iso-8859-4) ! ("iso-8859-5" iso-8859-5) ! ("iso-8859-6" iso-8859-6) ! ("iso-8859-7" iso-8859-7) ! ("iso-8859-8" iso-8859-8) ! ("iso-8859-9" iso-8859-9) ! ("iso-2022-jp" iso-2022-jp) ! ("big5" big5) ! ;; probably not correct, but probably better than nothing. ! ("iso-2022-jp-2" iso-2022-jp) ! ("iso-2022-int-1" iso-2022-int-1) ! ("iso-2022-kr" iso-2022-kr) ! ("euc-kr" iso-2022-kr) ! )) (defvar vm-mime-mule-charset-to-charset-alist --- 3541,3599 ---- (make-variable-buffer-local 'vm-folder-garbage-alist) + ;; Environment primitives, needed for MULE code that follows (defconst vm-mime-header-list '("MIME-Version:" "Content-")) + (defconst vm-xemacs-p nil) + (defconst vm-xemacs-mule-p nil) + (defconst vm-fsfemacs-p nil) + (defconst vm-fsfemacs-mule-p nil) + (defun vm-xemacs-p () vm-xemacs-p) + (defun vm-xemacs-mule-p () vm-xemacs-mule-p) + (defun vm-fsfemacs-p () vm-fsfemacs-p) + (defun vm-fsfemacs-mule-p () vm-fsfemacs-mule-p) + (defun vm-note-emacs-version () + (setq vm-xemacs-p (string-match "XEmacs" emacs-version) + vm-xemacs-mule-p (and vm-xemacs-p (featurep 'mule) + ;; paranoia + (fboundp 'set-file-coding-system)) + vm-fsfemacs-p (not vm-xemacs-p) + vm-fsfemacs-mule-p (and (not vm-xemacs-mule-p) (featurep 'mule) + (fboundp 'set-buffer-file-coding-system)))) + (vm-note-emacs-version) + (defconst vm-mime-mule-charset-to-coding-alist ! (cond (vm-fsfemacs-mule-p ! (let ((coding-systems (coding-system-list)) ! (alist nil) ! val) ! (while coding-systems ! (setq val (coding-system-get (car coding-systems) 'mime-charset)) ! (if val ! (setq alist (cons (list (symbol-name val) ! (car coding-systems)) ! alist))) ! (setq coding-systems (cdr coding-systems))) ! (setq alist (append '(("us-ascii" no-conversion)) alist)) ! alist)) ! (t ! '( ! ("us-ascii" no-conversion) ! ("iso-8859-1" no-conversion) ! ("iso-8859-2" iso-8859-2) ! ("iso-8859-3" iso-8859-3) ! ("iso-8859-4" iso-8859-4) ! ("iso-8859-5" iso-8859-5) ! ("iso-8859-6" iso-8859-6) ! ("iso-8859-7" iso-8859-7) ! ("iso-8859-8" iso-8859-8) ! ("iso-8859-9" iso-8859-9) ! ("iso-2022-jp" iso-2022-jp) ! ("big5" big5) ! ;; probably not correct, but probably better than nothing. ! ("iso-2022-jp-2" iso-2022-jp) ! ("iso-2022-int-1" iso-2022-int-1) ! ("iso-2022-kr" iso-2022-kr) ! ("euc-kr" iso-2022-kr) ! ) ! )) ! "Alist that maps MIME character sets to MULE coding systemss.") ! (defvar vm-mime-mule-charset-to-charset-alist *************** *** 3564,3573 **** (thai-tis620 "iso-2022-jp") ! )) (defvar vm-mime-mule-coding-to-charset-alist ! '( ! (iso-2022-8 "iso-2022-jp") ! (iso-2022-7-unix "iso-2022-jp") ! (iso-2022-7-dos "iso-2022-jp") ! (iso-2022-7-mac "iso-2022-jp") ! )) (defconst vm-mime-charset-completion-alist --- 3614,3641 ---- (thai-tis620 "iso-2022-jp") ! ) ! "Alist that maps MULE character sets to matching MIME character sets.") ! (defvar vm-mime-mule-coding-to-charset-alist ! (cond (vm-fsfemacs-mule-p ! (let ((coding-systems (coding-system-list)) ! (alist nil) ! val) ! (while coding-systems ! (setq val (coding-system-get (car coding-systems) 'mime-charset)) ! (if val ! (setq alist (cons (list (car coding-systems) ! (symbol-name val)) ! alist))) ! (setq coding-systems (cdr coding-systems))) ! (setq alist (append '((no-conversion "us-ascii")) alist)) ! alist)) ! (t ! '( ! (iso-2022-8 "iso-2022-jp") ! (iso-2022-7-unix "iso-2022-jp") ! (iso-2022-7-dos "iso-2022-jp") ! (iso-2022-7-mac "iso-2022-jp") ! ))) ! "Alist that maps MULE coding systems to MIME character sets.") ! (defconst vm-mime-charset-completion-alist *************** *** 3617,3635 **** (defvar shell-command-switch "-c")) - - (defconst vm-xemacs-p nil) - (defconst vm-xemacs-mule-p nil) - (defconst vm-fsfemacs-p nil) - (defconst vm-fsfemacs-mule-p nil) - (defun vm-xemacs-p () vm-xemacs-p) - (defun vm-xemacs-mule-p () vm-xemacs-mule-p) - (defun vm-fsfemacs-p () vm-fsfemacs-p) - (defun vm-fsfemacs-mule-p () vm-fsfemacs-mule-p) - (defun vm-note-emacs-version () - (setq vm-xemacs-p (string-match "XEmacs" emacs-version) - vm-xemacs-mule-p (and vm-xemacs-p (featurep 'mule) - ;; paranoia - (fboundp 'set-file-coding-system)) - vm-fsfemacs-p (not vm-xemacs-p) - vm-fsfemacs-mule-p (and (not vm-xemacs-mule-p) (featurep 'mule) - (fboundp 'set-buffer-file-coding-system)))) - (vm-note-emacs-version) --- 3685 ---- *** dist/vm-version.el.dist Sun Jan 17 17:42:38 1999 --- vm-version.el Fri Jan 29 00:09:12 1999 *************** *** 4,6 **** ! (defconst vm-version "6.64" "Version number of VM.") --- 4,6 ---- ! (defconst vm-version "6.65" "Version number of VM.") *** dist/vm-window.el.dist Tue Dec 15 09:10:28 1998 --- vm-window.el Mon Jan 25 21:58:40 1999 *************** *** 134,138 **** (set-buffer (setq work-buffer (get-buffer-create "*vm-wconfig*"))) ! ;; for XEmacs/MULE ! (and vm-xemacs-mule-p ! (set-buffer-file-coding-system 'no-conversion)) (erase-buffer) --- 134,138 ---- (set-buffer (setq work-buffer (get-buffer-create "*vm-wconfig*"))) ! ;; for MULE ! (if (or vm-xemacs-mule-p vm-fsfemacs-mule-p) ! (set-buffer-file-coding-system 'no-conversion)) (erase-buffer)