Mercurial > hg > xemacs-beta
comparison lisp/tm/tm-mh-e.el @ 48:56c54cf7c5b6 r19-16b90
Import from CVS: tag r19-16b90
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:56:04 +0200 |
parents | 4b173ad71786 |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
47:11c6df210d7f | 48:56c54cf7c5b6 |
---|---|
4 | 4 |
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> | 5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> |
6 ;; OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> | 6 ;; OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> |
7 ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp> | 7 ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp> |
8 ;; Created: 1993/11/21 (obsolete mh-e-mime.el) | 8 ;; Created: 1993/11/21 (obsolete mh-e-mime.el) |
9 ;; Version: $Revision: 1.2 $ | 9 ;; Version: $Revision: 1.3 $ |
10 ;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual | 10 ;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual |
11 | 11 |
12 ;; This file is part of tm (Tools for MIME). | 12 ;; This file is part of tm (Tools for MIME). |
13 | 13 |
14 ;; This program is free software; you can redistribute it and/or | 14 ;; This program is free software; you can redistribute it and/or |
46 | 46 |
47 ;;; @ version | 47 ;;; @ version |
48 ;;; | 48 ;;; |
49 | 49 |
50 (defconst tm-mh-e/RCS-ID | 50 (defconst tm-mh-e/RCS-ID |
51 "$Id: tm-mh-e.el,v 1.2 1996/12/22 00:29:40 steve Exp $") | 51 "$Id: tm-mh-e.el,v 1.3 1997/08/21 06:24:13 steve Exp $") |
52 | 52 |
53 (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) | 53 (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) |
54 | 54 |
55 | 55 |
56 ;;; @ variable | 56 ;;; @ variable |
71 (setq mode tm-mh-e/automatic-mime-preview) | 71 (setq mode tm-mh-e/automatic-mime-preview) |
72 ) | 72 ) |
73 ;; Display message NUMBER of FOLDER. | 73 ;; Display message NUMBER of FOLDER. |
74 ;; Sets the current buffer to the show buffer. | 74 ;; Sets the current buffer to the show buffer. |
75 (set-buffer folder) | 75 (set-buffer folder) |
76 (or show-buffer | |
77 (setq show-buffer mh-show-buffer)) | |
78 ;; Bind variables in folder buffer in case they are local | 76 ;; Bind variables in folder buffer in case they are local |
79 (let ((msg-filename (mh-msg-filename msg-num))) | 77 (let ((formfile mhl-formfile) |
78 (clean-message-header mh-clean-message-header) | |
79 (invisible-headers mh-invisible-headers) | |
80 (visible-headers mh-visible-headers) | |
81 (msg-filename (mh-msg-filename msg-num)) | |
82 (show-buffer mh-show-buffer) | |
83 ) | |
80 (if (not (file-exists-p msg-filename)) | 84 (if (not (file-exists-p msg-filename)) |
81 (error "Message %d does not exist" msg-num)) | 85 (error "Message %d does not exist" msg-num)) |
82 (set-buffer show-buffer) | 86 (set-buffer show-buffer) |
83 (cond ((not (equal msg-filename buffer-file-name)) | 87 (cond ((not (equal msg-filename buffer-file-name)) |
84 ;; Buffer does not yet contain message. | 88 ;; Buffer does not yet contain message. |
85 (clear-visited-file-modtime) | 89 (mh-unvisit-file) |
86 (unlock-buffer) | |
87 (setq buffer-file-name nil) ; no locking during setup | |
88 (setq buffer-read-only nil) | 90 (setq buffer-read-only nil) |
89 (erase-buffer) | 91 (erase-buffer) |
92 ;; Changing contents, so this hook needs to be reinitialized. | |
93 ;; pgp.el uses this. | |
94 (if (boundp 'write-contents-hooks) ;Emacs 19 | |
95 (setq write-contents-hooks nil)) | |
90 (if mode | 96 (if mode |
91 (let* ((aname (concat "article-" folder)) | 97 (let* ((aname (concat "article-" folder)) |
92 (abuf (get-buffer aname)) | 98 (abuf (get-buffer aname)) |
93 ) | 99 ) |
94 (if abuf | 100 (if abuf |
112 (setq buffer-file-name msg-filename) | 118 (setq buffer-file-name msg-filename) |
113 (mh-show-mode) | 119 (mh-show-mode) |
114 (mime/viewer-mode nil nil nil | 120 (mime/viewer-mode nil nil nil |
115 aname (concat "show-" folder)) | 121 aname (concat "show-" folder)) |
116 (goto-char (point-min)) | 122 (goto-char (point-min)) |
123 (let ( (buffer-read-only nil) ) | |
124 (cond (clean-message-header | |
125 (mh-clean-msg-header (point-min) | |
126 invisible-headers | |
127 visible-headers) | |
128 (goto-char (point-min))) | |
129 (t | |
130 (mh-start-of-uncleaned-message)))) | |
131 (goto-char (point-min)) | |
117 ) | 132 ) |
118 (let ((clean-message-header mh-clean-message-header) | 133 (progn |
119 (invisible-headers mh-invisible-headers) | 134 (if formfile |
120 (visible-headers mh-visible-headers) | |
121 ) | |
122 ;; 1995/9/21 | |
123 ;; modified by ARIURA <ariura@cc.tuat.ac.jp> | |
124 ;; to support mhl. | |
125 (if mhl-formfile | |
126 (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear" | 135 (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear" |
127 (if (stringp mhl-formfile) | 136 (if (stringp formfile) |
128 (list "-form" mhl-formfile)) | 137 (list "-form" formfile)) |
129 msg-filename) | 138 msg-filename) |
130 (insert-file-contents msg-filename)) | 139 (insert-file-contents msg-filename)) |
131 ;; end | 140 ;; end |
132 (goto-char (point-min)) | 141 (goto-char (point-min)) |
133 (cond (clean-message-header | 142 (cond (clean-message-header |
143 (set-buffer-modified-p nil) | 152 (set-buffer-modified-p nil) |
144 (setq buffer-read-only t) | 153 (setq buffer-read-only t) |
145 (setq buffer-file-name msg-filename) | 154 (setq buffer-file-name msg-filename) |
146 (mh-show-mode) | 155 (mh-show-mode) |
147 )) | 156 )) |
157 (set-buffer-modified-p nil) | |
148 (or (eq buffer-undo-list t) ;don't save undo info for prev msgs | 158 (or (eq buffer-undo-list t) ;don't save undo info for prev msgs |
149 (setq buffer-undo-list nil)) | 159 (setq buffer-undo-list nil)) |
150 ;;; Added by itokon (02/19/96) | 160 (set-buffer-auto-saved) |
161 ;; the parts of set-visited-file-name we want to do (no locking) | |
151 (setq buffer-file-name msg-filename) | 162 (setq buffer-file-name msg-filename) |
152 ;;; | 163 (setq buffer-backed-up nil) |
164 (auto-save-mode 1) | |
153 (set-mark nil) | 165 (set-mark nil) |
154 (setq mode-line-buffer-identification | 166 (setq mode-line-buffer-identification |
155 (list (format mh-show-buffer-mode-line-buffer-id | 167 (list (format mh-show-buffer-mode-line-buffer-id |
156 folder msg-num))) | 168 folder msg-num))) |
157 (set-buffer folder) | 169 (set-buffer folder) |