annotate lisp/vm/vm-startup.el @ 142:1856695b1fa9 r20-2b5

Import from CVS: tag r20-2b5
author cvs
date Mon, 13 Aug 2007 09:33:18 +0200
parents 585fb297b004
children 2af401a6ecca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; Entry points for VM
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
2 ;;; Copyright (C) 1994-1997 Kyle E. Jones
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;;; This program is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;;; it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;;; the Free Software Foundation; either version 1, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;;; This program is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;;; GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;;; You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;;; along with this program; if not, write to the Free Software
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 (provide 'vm-startup)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 (defun vm (&optional folder read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 "Read mail under Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 Optional first arg FOLDER specifies the folder to visit. It defaults
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 to the value of vm-primary-inbox. The folder buffer is put into VM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 mode, a major mode for reading mail.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 Prefix arg or optional second arg READ-ONLY non-nil indicates
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 that the folder should be considered read only. No attribute
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 118
diff changeset
28 changes, message additions or deletions will be allowed in the
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 visited folder.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 Visiting the primary inbox causes any contents of the system mailbox to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 be moved and appended to the resulting buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 All the messages can be read by repeatedly pressing SPC. Use `n'ext and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 `p'revious to move about in the folder. Messages are marked for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 deletion with `d', and saved to another folder with `s'. Quitting VM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 with `q' expunges deleted messages and saves the buffered folder to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 disk.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 See the documentation for vm-mode for more information."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (interactive (list nil current-prefix-arg))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 ;; set inhibit-local-variables non-nil to protect
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 ;; against letter bombs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 ;; set enable-local-variables to nil for newer Emacses
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (catch 'done
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 (let ((full-startup (not (bufferp folder)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 folder-buffer first-time totals-blurb
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 preserve-auto-save-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (setq folder-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 (if (bufferp folder)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 folder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (let ((file (or folder (expand-file-name vm-primary-inbox
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 vm-folder-directory))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (if (file-directory-p file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 ;; MH code perhaps... ?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 (error "%s is a directory" file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 (or (vm-get-file-buffer file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 (let ((default-directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 (or (and vm-folder-directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 (expand-file-name vm-folder-directory))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 default-directory))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 (inhibit-local-variables t)
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
64 (enable-local-variables nil)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
65 ;; for XEmacs/Mule
140
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
66 (coding-system-for-read 'no-conversion))
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
67 (message "Reading %s..." file)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (prog1 (find-file-noselect file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 ;; update folder history
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (let ((item (or folder vm-primary-inbox)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 (if (not (equal item (car vm-folder-history)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 (setq vm-folder-history
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (cons item vm-folder-history))))
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
74 (message "Reading %s... done" file))))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 (set-buffer folder-buffer)
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
76 ;; for XEmacs/MULE
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
77 ;;
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
78 ;; If the file coding system is not a no-conversion variant,
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
79 ;; make it so by encoding all the text, then setting
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
80 ;; the file coding system and decoding it.
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
81 ;; This is only possible if a file is visited and then vm-mode
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
82 ;; is run on it afterwards.
140
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
83 (defvar buffer-file-coding-system)
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 118
diff changeset
84 (if (and vm-xemacs-mule-p
140
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
85 (not (eq (get-coding-system buffer-file-coding-system)
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
86 (get-coding-system 'no-conversion-unix)))
140
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
87 (not (eq (get-coding-system buffer-file-coding-system)
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
88 (get-coding-system 'no-conversion-dos)))
140
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
89 (not (eq (get-coding-system buffer-file-coding-system)
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
90 (get-coding-system 'no-conversion-mac)))
140
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
91 (not (eq (get-coding-system buffer-file-coding-system)
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
92 (get-coding-system 'binary))))
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
93 (let ((buffer-read-only nil)
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
94 (omodified (buffer-modified-p)))
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
95 (unwind-protect
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
96 (progn
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
97 (encode-coding-region (point-min) (point-max)
140
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
98 buffer-file-coding-system)
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
99 (set-buffer-file-coding-system 'no-conversion nil)
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
100 (decode-coding-region (point-min) (point-max)
140
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
101 buffer-file-coding-system))
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
102 (set-buffer-modified-p omodified))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (vm-check-for-killed-summary)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
104 (vm-check-for-killed-presentation)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 ;; If the buffer's not modified then we know that there can be no
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 ;; messages in the folder that are not on disk.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (or (buffer-modified-p) (setq vm-messages-not-on-disk 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (setq first-time (not (eq major-mode 'vm-mode))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 preserve-auto-save-file (and buffer-file-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 (not (buffer-modified-p))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 (file-newer-than-file-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 (make-auto-save-file-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 buffer-file-name)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 ;; Force the folder to be read only if the auto
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 ;; save file contains information the user might not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 ;; want overwritten, i.e. recover-file might be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 ;; desired. What we want to avoid is an auto-save.
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
118 ;; Making the folder read only will keep
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 ;; subsequent actions from modifying the buffer in a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 ;; way that triggers an auto save.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 ;; Also force the folder read-only if it was read only and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 ;; not already in vm-mode, since there's probably a good
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 ;; reason for this.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 (setq vm-folder-read-only (or preserve-auto-save-file read-only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 (default-value 'vm-folder-read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (and first-time buffer-read-only)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 ;; If this is not a VM mode buffer then some initialization
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 ;; needs to be done
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (if first-time
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 (if (fboundp 'buffer-disable-undo)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 (buffer-disable-undo (current-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 ;; obfuscation to make the v19 compiler not whine
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 ;; about obsolete functions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 (let ((x 'buffer-flush-undo))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 (funcall x (current-buffer))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (abbrev-mode 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 (auto-fill-mode 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (vm-mode-internal)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 (vm-assimilate-new-messages nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (if first-time
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (vm-gobble-visible-header-variables)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 (vm-gobble-bookmark)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 (vm-gobble-summary)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 (vm-gobble-labels)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 (vm-start-itimers-if-needed)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 ;; make a new frame if the user wants one. reuse an
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 ;; existing frame that is showing this folder.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 (if (and full-startup
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 ;; this so that "emacs -f vm" doesn't create a frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 this-command)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
155 (apply 'vm-goto-new-folder-frame-maybe
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
156 (if folder '(folder) '(primary-folder folder))))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
157
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
158 ;; raise frame if requested and apply startup window
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
159 ;; configuration.
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
160 (if full-startup
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
161 (progn
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
162 (if vm-raise-frame-at-startup
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
163 (vm-raise-frame))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
164 (vm-display nil nil (list this-command)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
165 (list (or this-command 'vm) 'startup))))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
166
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 ;; say this NOW, before the non-previewers read a message,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 ;; alter the new message count and confuse themselves.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (if full-startup
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 ;; save blurb so we can repeat it later as necessary.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (setq totals-blurb (vm-emit-totals-blurb)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (vm-thoughtfully-select-message)
126
1370575f1259 Import from CVS: tag xemacs-20-1p1
cvs
parents: 120
diff changeset
174 (vm-update-summary-and-mode-line)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 ;; need to do this after any frame creation because the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 ;; toolbar sets frame-specific height and width specifiers.
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
177 (and (vm-toolbar-support-possible-p) vm-use-toolbar
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 (vm-toolbar-install-toolbar)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 (vm-toolbar-update-toolbar)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (and vm-use-menus (vm-menu-support-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (vm-menu-install-visited-folders-menu))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 (if full-startup
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
186 (progn
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
187 (if (and (vm-should-generate-summary)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 ;; don't generate a summary if recover-file is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 ;; likely to happen, since recover-file does
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 ;; nothing useful in a summary buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 (not preserve-auto-save-file))
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
192 (vm-summarize t nil))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
193 ;; raise the summary frame if the user wants frames
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
194 ;; raised and if there is a summary frame.
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
195 (if (and vm-summary-buffer
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
196 vm-frame-per-summary
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
197 vm-raise-frame-at-startup)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
198 (vm-raise-frame))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
199 ;; if vm-mutable-windows is nil, the startup
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
200 ;; configuration can't be applied, so do
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
201 ;; something to get a VM buffer on the screen
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
202 (if vm-mutable-windows
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
203 (vm-display nil nil (list this-command)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
204 (list (or this-command 'vm) 'startup))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
205 (save-excursion
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
206 (switch-to-buffer (or vm-summary-buffer
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
207 vm-presentation-buffer
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
208 (current-buffer)))))))
54
05472e90ae02 Import from CVS: tag r19-16-pre2
cvs
parents: 42
diff changeset
209
126
1370575f1259 Import from CVS: tag xemacs-20-1p1
cvs
parents: 120
diff changeset
210 (if vm-message-list
1370575f1259 Import from CVS: tag xemacs-20-1p1
cvs
parents: 120
diff changeset
211 (vm-preview-current-message))
1370575f1259 Import from CVS: tag xemacs-20-1p1
cvs
parents: 120
diff changeset
212
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 (run-hooks 'vm-visit-folder-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 (if full-startup
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 (message totals-blurb))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 ;; Warn user about auto save file, if appropriate.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 (if (and full-startup preserve-auto-save-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 (message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 (substitute-command-keys
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 "Auto save file is newer; consider \\[recover-file]. FOLDER IS READ ONLY.")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 ;; if we're not doing a full startup or if doing more would
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 ;; trash the auto save file that we need to preserve,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 ;; stop here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 (if (or (not full-startup) preserve-auto-save-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 (throw 'done t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 (if (and vm-auto-get-new-mail
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 (not vm-block-new-mail)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 (not vm-folder-read-only))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 (progn
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 100
diff changeset
231 (message "Checking for new mail for %s..."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 (or buffer-file-name (buffer-name)))
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
233 (if (and (vm-get-spooled-mail t) (vm-assimilate-new-messages t))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 (setq totals-blurb (vm-emit-totals-blurb))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 (if (vm-thoughtfully-select-message)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 (vm-preview-current-message)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 (vm-update-summary-and-mode-line))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 (message totals-blurb)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 ;; Display copyright and copying info unless
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 ;; user says no.
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
243 (if (and (interactive-p) (not vm-startup-message-displayed))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 (vm-display-startup-message)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 (if (not (input-pending-p))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 (message totals-blurb)))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 (defun vm-other-frame (&optional folder read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 "Like vm, but run in a newly created frame."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 (interactive (list nil current-prefix-arg))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 (if (vm-multiple-frames-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 (if folder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 (vm-goto-new-frame 'folder)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 (vm-goto-new-frame 'primary-folder 'folder)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 (let ((vm-frame-per-folder nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 (vm-search-other-frames nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 (vm folder read-only))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 (if (vm-multiple-frames-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 (vm-set-hooks-for-frame-deletion)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 (defun vm-other-window (&optional folder read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 "Like vm, but run in a different window."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 (interactive (list nil current-prefix-arg))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 (if (one-window-p t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 (split-window))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 (other-window 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 (let ((vm-frame-per-folder nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 (vm-search-other-frames nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 (vm folder read-only)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 (put 'vm-mode 'mode-class 'special)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 (defun vm-mode (&optional read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 "Major mode for reading mail.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278
140
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
279 This is VM 6.30.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281 Commands:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 h - summarize folder contents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 C-t - toggle threads display
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 n - go to next message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 p - go to previous message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 N - like `n' but ignores skip-variable settings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288 P - like `p' but ignores skip-variable settings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 M-n - go to next unread message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 M-p - go to previous unread message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 RET - go to numbered message (uses prefix arg or prompts in minibuffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292 TAB - go to last message seen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 ^ - go to parent of this message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294 M-s - incremental search through the folder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 t - display hidden headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297 SPC - expose message body or scroll forward a page
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 b - scroll backward a page
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 < - go to beginning of current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 > - go to end of current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 d - delete message, prefix arg deletes messages forward
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 C-d - delete message, prefix arg deletes messages backward
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 u - undelete
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 k - flag for deletion all messages with same subject as the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 r - reply (only to the sender of the message)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 R - reply with included text from the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 M-r - extract and resend bounced message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 f - followup (reply to all recipients of message)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 F - followup with included text from the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312 z - forward the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 m - send a message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 B - resend the current message to another user.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 c - continue composing the most recent message you were composing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 @ - digestify and mail entire folder contents (the folder is not modified)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 * - burst a digest into individual messages, and append and assimilate these
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
319 messages into the current folder.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 G - sort messages by various keys
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323 g - get any new mail that has arrived in the system mailbox
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 (new mail is appended to the disk and buffer copies of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 primary inbox.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 v - visit another mail folder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 e - edit the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 j - discard cached information about the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 s - save current message in a folder (appends if folder already exists)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 w - write current message to a file without its headers (appends if exists)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 S - save entire folder to disk, does not expunge
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 A - save unfiled messages to their vm-auto-folder-alist specified folders
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 # - expunge deleted messages (without saving folder)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 q - quit VM, deleted messages are not expunged, folder is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 saved to disk if it is modified. new messages are changed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 to be flagged as just unread.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 x - exit VM with no change to the folder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 M N - use marks; the next vm command will affect only marked messages
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 102
diff changeset
342 if it makes sense for the command to do so. These commands
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 102
diff changeset
343 apply and remove marks to messages.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 M M - mark the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 M U - unmark the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 M m - mark all messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 M u - unmark all messages
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
349 M C - mark messages matched by a virtual folder selector
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
350 M c - unmark messages matched by a virtual folder selector
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 M T - mark thread tree rooted at the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 M t - unmark thread tree rooted at the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 M S - mark messages with the same subject as the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 M s - unmark messages with the same subject as the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 M A - mark messages with the same author as the current message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 M a - unmark messages with the same author as the current message
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
357 M R - mark messages within the point/mark region in the summary
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
358 M r - unmark messages within the point/mark region in the summary
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 M ? - partial help for mark commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 W S - save the current window configuration to a name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 W D - delete a window configuration
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 W W - apply a configuration
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 W ? - help for the window configuration commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 V V - visit a virtual folder (must be defined in vm-virtual-folder-alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 V C - create a virtual folder composed of a subset of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 current folder's messages.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 V A - apply the selectors of a named virtual folder to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 messages in the current folder and create a virtual folder
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 containing the selected messages.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 V M - toggle whether this virtual folder's messages mirror the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 underlying real messages' attributes.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 V ? - help for virtual folder commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 C-_ - undo, special undo that retracts the most recent
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 102
diff changeset
378 changes in message attributes and labels. Expunges,
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 message edits, and saves cannot be undone. C-x u is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 also bound to this command.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 a - set message attributes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 l a - add labels to message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 l d - delete labels from message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387 L - reload your VM init file, ~/.vm
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 % - change a folder to another type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 ? - help
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 ! - run a shell command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 | - run a shell command with the current message as input
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 M-C - view conditions under which you may redistribute VM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 M-W - view the details of VM's lack of a warranty
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 Use M-x vm-submit-bug-report to submit a bug report.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 Variables:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 vm-arrived-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 vm-arrived-messages-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 vm-auto-center-summary
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
405 vm-auto-decode-mime-messages
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
406 vm-auto-displayed-mime-content-types
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 vm-auto-folder-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 vm-auto-folder-case-fold-search
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 vm-auto-get-new-mail
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410 vm-auto-next-message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 vm-berkeley-mail-compatibility
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
412 vm-burst-digest-messages-inherit-labels
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 vm-check-folder-types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 vm-circular-folders
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 vm-confirm-new-folders
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 vm-confirm-quit
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
417 vm-convert-folder-types
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 vm-crash-box
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
419 vm-crash-box-suffix
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420 vm-default-folder-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 vm-delete-after-archiving
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 vm-delete-after-bursting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 vm-delete-after-saving
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 vm-delete-empty-folders
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425 vm-digest-burst-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426 vm-digest-center-preamble
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427 vm-digest-preamble-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 vm-digest-send-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429 vm-display-buffer-hook
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
430 vm-display-using-mime
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431 vm-edit-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 vm-folder-directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 vm-folder-read-only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434 vm-follow-summary-cursor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435 vm-forward-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436 vm-forwarded-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 vm-forwarding-digest-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438 vm-forwarding-subject-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439 vm-frame-parameter-alist
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
440 vm-frame-per-completion
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441 vm-frame-per-composition
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
442 vm-frame-per-edit
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 vm-frame-per-folder
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
444 vm-frame-per-summary
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 vm-highlighted-header-face
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446 vm-highlighted-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447 vm-honor-page-delimiters
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
448 vm-image-directory
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 vm-in-reply-to-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450 vm-included-text-attribution-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451 vm-included-text-discard-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452 vm-included-text-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453 vm-included-text-prefix
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 vm-invisible-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
455 vm-jump-to-new-messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456 vm-jump-to-unread-messages
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
457 vm-keep-crash-boxes
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
458 vm-keep-sent-messages
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
459 vm-mail-check-interval
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 vm-mail-header-from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461 vm-mail-mode-hook
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
462 vm-make-crash-box-name
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
463 vm-make-spool-file-name
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
464 vm-mime-8bit-composition-charset
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
465 vm-mime-8bit-text-transfer-encoding
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
466 vm-mime-alternative-select-method
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
467 vm-mime-attachment-auto-type-alist
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
468 vm-mime-attachment-save-directory
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
469 vm-mime-avoid-folding-content-type
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
470 vm-mime-base64-decoder-program
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
471 vm-mime-base64-decoder-switches
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
472 vm-mime-base64-encoder-program
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
473 vm-mime-base64-encoder-switches
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
474 vm-mime-button-face
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
475 vm-mime-charset-font-alist
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
476 vm-mime-default-face-charsets
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
477 vm-mime-digest-discard-header-regexp
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
478 vm-mime-digest-headers
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
479 vm-mime-display-function
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
480 vm-mime-external-content-types-alist
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
481 vm-mime-ignore-mime-version
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
482 vm-mime-internal-content-types
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
483 vm-mime-max-message-size
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 vm-mode-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485 vm-mosaic-program
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
486 vm-mosaic-program-switches
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 vm-move-after-deleting
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
488 vm-move-after-killing
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 vm-move-after-undeleting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 vm-move-messages-physically
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
491 vm-mutable-frames
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
492 vm-mutable-windows
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 vm-netscape-program
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
494 vm-netscape-program-switches
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
495 vm-pop-bytes-per-session
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
496 vm-pop-max-message-size
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 vm-pop-md5-program
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
498 vm-pop-messages-per-session
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
499 vm-popup-menu-on-mouse-3
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
500 vm-preferences-file
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 vm-preview-lines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 vm-preview-read-messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503 vm-primary-inbox
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504 vm-quit-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 vm-recognize-pop-maildrops
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 vm-reply-hook
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
507 vm-reply-ignored-addresses
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
508 vm-reply-ignored-reply-tos
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 vm-reply-subject-prefix
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510 vm-resend-bounced-discard-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 vm-resend-bounced-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512 vm-resend-bounced-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513 vm-resend-discard-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 vm-resend-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 vm-resend-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 vm-retrieved-spooled-mail-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 vm-rfc1153-digest-discard-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 vm-rfc1153-digest-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 vm-rfc934-digest-discard-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520 vm-rfc934-digest-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521 vm-search-using-regexps
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 vm-select-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523 vm-select-new-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524 vm-select-unread-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525 vm-send-digest-hook
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
526 vm-send-using-mime
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527 vm-skip-deleted-messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528 vm-skip-read-messages
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
529 vm-spool-file-suffixes
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530 vm-spool-files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531 vm-startup-with-summary
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 vm-strip-reply-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533 vm-summary-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534 vm-summary-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535 vm-summary-highlight-face
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 vm-summary-mode-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 vm-summary-redo-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 vm-summary-show-threads
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539 vm-summary-thread-indent-level
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
540 vm-tale-is-an-idiot
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
541 vm-temp-file-directory
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 vm-trust-From_-with-Content-Length
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
543 vm-undisplay-buffer-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544 vm-unforwarded-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545 vm-url-browser
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546 vm-url-search-limit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547 vm-use-menus
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
548 vm-use-toolbar
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 vm-virtual-folder-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 vm-virtual-mirror
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 vm-visible-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 vm-visit-folder-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 vm-visit-when-saving
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 vm-warp-mouse-to-new-frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 vm-window-configuration-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556 "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557 (interactive "P")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558 (vm (current-buffer) read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559 (vm-display nil nil '(vm-mode) '(vm-mode)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
560
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561 (defun vm-visit-folder (folder &optional read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562 "Visit a mail file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563 VM will parse and present its messages to you in the usual way.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565 First arg FOLDER specifies the mail file to visit. When this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566 command is called interactively the file name is read from the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 minibuffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 Prefix arg or optional second arg READ-ONLY non-nil indicates
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570 that the folder should be considered read only. No attribute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 changes, messages additions or deletions will be allowed in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572 visited folder."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 (interactive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
576 (vm-select-folder-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
577 (let ((default-directory (if vm-folder-directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
578 (expand-file-name vm-folder-directory)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
579 default-directory))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
580 (default (or vm-last-visit-folder vm-last-save-folder))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
581 (this-command this-command)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
582 (last-command last-command))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 (list (vm-read-file-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
584 (format "Visit%s folder:%s "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
585 (if current-prefix-arg " read only" "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
586 (if default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
587 (format " (default %s)" default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
588 ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
589 default-directory default nil nil 'vm-folder-history)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
590 current-prefix-arg))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
591 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
592 (vm-select-folder-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
593 (vm-check-for-killed-summary)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
594 (setq vm-last-visit-folder folder)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
595 (let ((default-directory (or vm-folder-directory default-directory)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
596 (setq folder (expand-file-name folder)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
597 (vm folder read-only))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
598
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
599 (defun vm-visit-folder-other-frame (folder &optional read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
600 "Like vm-visit-folder, but run in a newly created frame."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
601 (interactive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
602 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
603 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
604 (vm-select-folder-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
605 (let ((default-directory (if vm-folder-directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
606 (expand-file-name vm-folder-directory)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
607 default-directory))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
608 (default (or vm-last-visit-folder vm-last-save-folder))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
609 (this-command this-command)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
610 (last-command last-command))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
611 (list (vm-read-file-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
612 (format "Visit%s folder in other frame:%s "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
613 (if current-prefix-arg " read only" "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
614 (if default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
615 (format " (default %s)" default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
616 ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
617 default-directory default nil nil 'vm-folder-history)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
618 current-prefix-arg))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
619 (if (vm-multiple-frames-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
620 (vm-goto-new-frame 'folder))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
621 (let ((vm-frame-per-folder nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
622 (vm-search-other-frames nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
623 (vm-visit-folder folder read-only))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
624 (if (vm-multiple-frames-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
625 (vm-set-hooks-for-frame-deletion)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
626
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
627 (defun vm-visit-folder-other-window (folder &optional read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
628 "Like vm-visit-folder, but run in a different window."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
629 (interactive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
630 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
631 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
632 (vm-select-folder-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
633 (let ((default-directory (if vm-folder-directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
634 (expand-file-name vm-folder-directory)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
635 default-directory))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
636 (default (or vm-last-visit-folder vm-last-save-folder))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
637 (this-command this-command)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
638 (last-command last-command))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
639 (list (vm-read-file-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
640 (format "Visit%s folder in other window:%s "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
641 (if current-prefix-arg " read only" "")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
642 (if default
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
643 (format " (default %s)" default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
644 ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
645 default-directory default nil nil 'vm-folder-history)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
646 current-prefix-arg))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
647 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
648 (if (one-window-p t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
649 (split-window))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
650 (other-window 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
651 (let ((vm-frame-per-folder nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
652 (vm-search-other-frames nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
653 (vm-visit-folder folder read-only)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
654
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
655 (put 'vm-virtual-mode 'mode-class 'special)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
656
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
657 (defun vm-virtual-mode (&rest ignored)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
658 "Mode for reading multiple mail folders as one folder.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
659
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
660 The commands available are the same commands that are found in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
661 vm-mode, except that a few of them are not applicable to virtual
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
662 folders.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
663
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
664 vm-virtual-mode is not a normal major mode. If you run it, it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
665 will not do anything. The entry point to vm-virtual-mode is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
666 vm-visit-virtual-folder.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
667
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
668 (defvar scroll-in-place)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
669
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
670 (defun vm-visit-virtual-folder (folder-name &optional read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
671 (interactive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
672 (let ((last-command last-command)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
673 (this-command this-command))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
674 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
675 (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
676 (vm-read-string "Visit virtual folder: " vm-virtual-folder-alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
677 current-prefix-arg)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
678 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
679 (if (not (assoc folder-name vm-virtual-folder-alist))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
680 (error "No such virtual folder, %s" folder-name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
681 (let ((buffer-name (concat "(" folder-name ")"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
682 first-time blurb)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
683 (set-buffer (get-buffer-create buffer-name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
684 (setq first-time (not (eq major-mode 'vm-virtual-mode)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
685 (if first-time
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
686 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
687 (if (fboundp 'buffer-disable-undo)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
688 (buffer-disable-undo (current-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
689 ;; obfuscation to make the v19 compiler not whine
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
690 ;; about obsolete functions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
691 (let ((x 'buffer-flush-undo))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
692 (funcall x (current-buffer))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
693 (abbrev-mode 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
694 (auto-fill-mode 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
695 (setq mode-name "VM Virtual"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
696 mode-line-format vm-mode-line-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
697 buffer-read-only t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
698 vm-folder-read-only read-only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
699 vm-label-obarray (make-vector 29 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
700 vm-virtual-folder-definition
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
701 (assoc folder-name vm-virtual-folder-alist))
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
702 ;; scroll in place messes with scroll-up and this loses
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
703 (make-local-variable 'scroll-in-place)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
704 (setq scroll-in-place nil)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
705 (vm-build-virtual-message-list nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
706 (use-local-map vm-mode-map)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
707 (and (vm-menu-support-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
708 (vm-menu-install-menus))
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
709 (add-hook 'kill-buffer-hook 'vm-garbage-collect-folder)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
710 (add-hook 'kill-buffer-hook 'vm-garbage-collect-message)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
711 ;; save this for last in case the user interrupts.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
712 ;; an interrupt anywhere before this point will cause
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
713 ;; everything to be redone next revisit.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
714 (setq major-mode 'vm-virtual-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
715 (run-hooks 'vm-virtual-mode-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
716 ;; must come after the setting of major-mode
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
717 (setq mode-popup-menu (and vm-use-menus vm-popup-menu-on-mouse-3
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
718 (vm-menu-support-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
719 (vm-menu-mode-menu)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
720 (setq blurb (vm-emit-totals-blurb))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
721 (if vm-summary-show-threads
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
722 (vm-sort-messages "thread"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
723 (if (vm-thoughtfully-select-message)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
724 (vm-preview-current-message)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
725 (vm-update-summary-and-mode-line))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
726 (message blurb)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
727 ;; make a new frame if the user wants one. reuse an
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
728 ;; existing frame that is showing this folder.
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
729 (vm-goto-new-folder-frame-maybe 'folder)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
730 (if vm-raise-frame-at-startup
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
731 (vm-raise-frame))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
732 (vm-display nil nil (list this-command) (list this-command 'startup))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
733 (and (vm-toolbar-support-possible-p) vm-use-toolbar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
734 (vm-toolbar-install-toolbar))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
735 (if first-time
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
736 (progn
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
737 (if (vm-should-generate-summary)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
738 (progn (vm-summarize t nil)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
739 (message blurb)))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
740 ;; raise the summary frame if the user wants frames
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
741 ;; raised and if there is a summary frame.
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
742 (if (and vm-summary-buffer
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
743 vm-frame-per-summary
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
744 vm-raise-frame-at-startup)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
745 (vm-raise-frame))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
746 ;; if vm-mutable-windows is nil, the startup
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
747 ;; configuration can't be applied, so do
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
748 ;; something to get a VM buffer on the screen
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
749 (if vm-mutable-windows
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
750 (vm-display nil nil (list this-command)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
751 (list (or this-command 'vm) 'startup))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
752 (save-excursion
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
753 (switch-to-buffer (or vm-summary-buffer
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
754 vm-presentation-buffer
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
755 (current-buffer)))))))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
756
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
757 ;; check interactive-p so as not to bog the user down if they
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
758 ;; run this function from within another function.
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
759 (and (interactive-p)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
760 (not vm-startup-message-displayed)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
761 (vm-display-startup-message)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
762 (message blurb))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
763
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
764 (defun vm-visit-virtual-folder-other-frame (folder-name &optional read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
765 "Like vm-visit-virtual-folder, but run in a newly created frame."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
766 (interactive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
767 (let ((last-command last-command)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
768 (this-command this-command))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
769 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
770 (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
771 (vm-read-string "Visit virtual folder in other frame: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
772 vm-virtual-folder-alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
773 current-prefix-arg)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
774 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
775 (if (vm-multiple-frames-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
776 (vm-goto-new-frame 'folder))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
777 (let ((vm-frame-per-folder nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
778 (vm-search-other-frames nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
779 (vm-visit-virtual-folder folder-name read-only))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
780 (if (vm-multiple-frames-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
781 (vm-set-hooks-for-frame-deletion)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
782
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
783 (defun vm-visit-virtual-folder-other-window (folder-name &optional read-only)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
784 "Like vm-visit-virtual-folder, but run in a different window."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
785 (interactive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
786 (let ((last-command last-command)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
787 (this-command this-command))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
788 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
789 (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
790 (vm-read-string "Visit virtual folder in other window: "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
791 vm-virtual-folder-alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
792 current-prefix-arg)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
793 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
794 (if (one-window-p t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
795 (split-window))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
796 (other-window 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
797 (let ((vm-frame-per-folder nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
798 (vm-search-other-frames nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
799 (vm-visit-virtual-folder folder-name read-only)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
800
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
801 (defun vm-mail ()
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
802 "Send a mail message from within VM, or from without."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
803 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
804 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
805 (vm-select-folder-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
806 (vm-check-for-killed-summary)
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
807 (vm-mail-internal)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
808 (run-hooks 'vm-mail-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
809 (run-hooks 'vm-mail-mode-hook))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
810
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
811 (defun vm-mail-other-frame ()
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
812 "Like vm-mail, but run in a newly created frame."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
813 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
814 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
815 (if (vm-multiple-frames-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
816 (vm-goto-new-frame 'composition))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
817 (let ((vm-frame-per-composition nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
818 (vm-search-other-frames nil))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
819 (vm-mail))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
820 (if (vm-multiple-frames-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
821 (vm-set-hooks-for-frame-deletion)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
822
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
823 (defun vm-mail-other-window ()
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
824 "Like vm-mail, but run in a different window."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
825 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
826 (vm-session-initialization)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
827 (if (one-window-p t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
828 (split-window))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
829 (other-window 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
830 (let ((vm-frame-per-composition nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
831 (vm-search-other-frames nil))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 54
diff changeset
832 (vm-mail)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
833
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
834 (defun vm-submit-bug-report ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
835 "Submit a bug report, with pertinent information to the VM bug list."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
836 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
837 (require 'reporter)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
838 ;; make sure the user doesn't try to use vm-mail here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
839 (let ((reporter-mailer '(mail)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
840 (delete-other-windows)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
841 (reporter-submit-bug-report
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
842 vm-maintainer-address
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
843 (concat "VM " vm-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
844 (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
845 'vm-arrived-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
846 'vm-arrived-messages-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
847 'vm-auto-center-summary
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
848 'vm-auto-decode-mime-messages
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
849 'vm-auto-displayed-mime-content-types
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
850 ;; don't send this by default, might be personal stuff in here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
851 ;; 'vm-auto-folder-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
852 'vm-auto-folder-case-fold-search
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
853 'vm-auto-get-new-mail
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
854 'vm-auto-next-message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
855 'vm-berkeley-mail-compatibility
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
856 'vm-check-folder-types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
857 'vm-circular-folders
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
858 'vm-confirm-new-folders
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
859 'vm-confirm-quit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
860 'vm-convert-folder-types
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
861 'vm-crash-box
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
862 'vm-crash-box-suffix
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
863 'vm-default-folder-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
864 'vm-delete-after-archiving
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
865 'vm-delete-after-bursting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
866 'vm-delete-after-saving
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
867 'vm-delete-empty-folders
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
868 'vm-digest-burst-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
869 'vm-digest-identifier-header-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
870 'vm-digest-center-preamble
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
871 'vm-digest-preamble-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
872 'vm-digest-send-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
873 'vm-display-buffer-hook
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
874 'vm-display-using-mime
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
875 'vm-edit-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
876 'vm-edit-message-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
877 'vm-flush-interval
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
878 'vm-folder-directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
879 'vm-folder-read-only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
880 'vm-follow-summary-cursor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
881 'vm-forward-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
882 'vm-forwarded-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
883 'vm-forwarding-digest-type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
884 'vm-forwarding-subject-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
885 'vm-frame-parameter-alist
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
886 'vm-frame-per-completion
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
887 'vm-frame-per-composition
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
888 'vm-frame-per-edit
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
889 'vm-frame-per-folder
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
890 'vm-frame-per-summary
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
891 'vm-highlight-url-face
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
892 'vm-highlighted-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
893 'vm-honor-page-delimiters
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
894 'vm-image-directory
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
895 'vm-in-reply-to-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
896 'vm-included-text-attribution-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
897 'vm-included-text-discard-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
898 'vm-included-text-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
899 'vm-included-text-prefix
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
900 'vm-init-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
901 'vm-invisible-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
902 'vm-jump-to-new-messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
903 'vm-jump-to-unread-messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
904 'vm-keep-crash-boxes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
905 'vm-keep-sent-messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
906 'vm-mail-header-from
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
907 'vm-mail-hook
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
908 'vm-make-crash-box-name
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
909 'vm-make-spool-file-name
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
910 'vm-mail-check-interval
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
911 'vm-mail-mode-hook
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
912 'vm-mime-8bit-composition-charset
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
913 'vm-mime-8bit-text-transfer-encoding
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
914 'vm-mime-alternative-select-method
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
915 'vm-mime-attachment-auto-type-alist
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
916 'vm-mime-attachment-save-directory
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
917 'vm-mime-avoid-folding-content-type
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
918 'vm-mime-base64-decoder-program
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
919 'vm-mime-base64-decoder-switches
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
920 'vm-mime-base64-encoder-program
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
921 'vm-mime-base64-encoder-switches
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
922 'vm-mime-button-face
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
923 'vm-mime-charset-font-alist
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
924 'vm-mime-default-face-charsets
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
925 'vm-mime-digest-discard-header-regexp
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
926 'vm-mime-digest-headers
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
927 'vm-mime-display-function
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
928 'vm-mime-external-content-types-alist
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
929 'vm-mime-ignore-mime-version
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
930 'vm-mime-internal-content-types
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
931 'vm-mime-max-message-size
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
932 'vm-mode-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
933 'vm-mode-hooks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
934 'vm-mosaic-program
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
935 'vm-mosaic-program-switches
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
936 'vm-move-after-deleting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
937 'vm-move-after-undeleting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
938 'vm-move-messages-physically
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
939 'vm-movemail-program
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
940 'vm-mutable-frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
941 'vm-mutable-windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
942 'vm-netscape-program
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
943 'vm-netscape-program-switches
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
944 'vm-pop-bytes-per-session
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
945 'vm-pop-max-message-size
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
946 'vm-pop-messages-per-session
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
947 'vm-pop-md5-program
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
948 'vm-popup-menu-on-mouse-3
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
949 'vm-preferences-file
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
950 'vm-preview-lines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
951 'vm-preview-read-messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
952 'vm-primary-inbox
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
953 'vm-quit-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
954 'vm-recognize-pop-maildrops
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
955 'vm-reply-hook
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
956 ;; don't feed the spammers or crackers
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
957 ;; 'vm-reply-ignored-addresses
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
958 'vm-reply-ignored-reply-tos
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
959 'vm-reply-subject-prefix
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
960 'vm-resend-bounced-discard-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
961 'vm-resend-bounced-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
962 'vm-resend-bounced-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
963 'vm-resend-discard-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
964 'vm-resend-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
965 'vm-resend-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
966 'vm-retrieved-spooled-mail-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
967 'vm-rfc1153-digest-discard-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
968 'vm-rfc1153-digest-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
969 'vm-rfc934-digest-discard-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
970 'vm-rfc934-digest-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
971 'vm-search-using-regexps
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
972 'vm-select-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
973 'vm-select-new-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
974 'vm-select-unread-message-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
975 'vm-send-digest-hook
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
976 'vm-send-using-mime
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
977 'vm-skip-deleted-messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
978 'vm-skip-read-messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
979 ;; don't send vm-spool-files by default, might contain passwords
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
980 ;; 'vm-spool-files
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
981 'vm-spool-file-suffixes
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
982 'vm-startup-with-summary
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
983 'vm-strip-reply-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
984 'vm-summary-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
985 'vm-summary-highlight-face
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
986 'vm-summary-mode-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
987 'vm-summary-mode-hooks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
988 'vm-summary-redo-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
989 'vm-summary-show-threads
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
990 'vm-summary-thread-indent-level
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
991 'vm-summary-uninteresting-senders
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
992 'vm-summary-uninteresting-senders-arrow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
993 'vm-tale-is-an-idiot
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
994 'vm-temp-file-directory
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
995 'vm-trust-From_-with-Content-Length
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
996 'vm-undisplay-buffer-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
997 'vm-unforwarded-header-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
998 'vm-url-browser
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
999 'vm-url-search-limit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1000 'vm-use-menus
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1001 'vm-use-toolbar
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1002 'vm-virtual-folder-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1003 'vm-virtual-mirror
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1004 'vm-visible-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1005 'vm-visit-folder-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1006 'vm-visit-when-saving
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1007 'vm-warp-mouse-to-new-frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1008 'vm-window-configuration-file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1009 ;; see what the user had loaded
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1010 'features
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1011 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1012 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1013 nil
136
b980b6286996 Import from CVS: tag r20-2b2
cvs
parents: 131
diff changeset
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.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1015 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1016 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1017 (mail-position-on-field "Subject")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1018 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1019 (delete-region (point) (progn (forward-line) (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1020 (insert "Subject: VM " vm-version " induces a brain tumor in the user.\n It is the tumor that creates the hallucinations.\n"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1021
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1022 (defun vm-load-init-file (&optional interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1023 (interactive "p")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1024 (if (or (not vm-init-file-loaded) interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1025 (load vm-init-file (not interactive) (not interactive) t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1026 (setq vm-init-file-loaded t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1027 (vm-display nil nil '(vm-load-init-file) '(vm-load-init-file)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1028
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1029 (defun vm-check-emacs-version ()
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 118
diff changeset
1030 (cond ((and vm-xemacs-p
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1031 (or (< emacs-major-version 19)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1032 (and (= emacs-major-version 19)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1033 (< emacs-minor-version 14))))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1034 (error "VM %s must be run on XEmacs 19.14 or a later version."
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1035 vm-version))
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 118
diff changeset
1036 ((and vm-fsfemacs-19-p
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1037 (or (< emacs-major-version 19)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1038 (and (= emacs-major-version 19)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1039 (< emacs-minor-version 34))))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1040 (error "VM %s must be run on Emacs 19.34 or a later version."
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1041 vm-version))))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1042
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1043 (defun vm-set-debug-flags ()
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1044 (or stack-trace-on-error
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1045 debug-on-error
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1046 (setq stack-trace-on-error
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1047 '(
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1048 wrong-type-argument
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1049 wrong-number-of-arguments
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1050 args-out-of-range
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1051 void-function
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1052 void-variable
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1053 ))))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
1054
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1055 (defun vm-session-initialization ()
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 118
diff changeset
1056 (vm-note-emacs-version)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 76
diff changeset
1057 (vm-check-emacs-version)
136
b980b6286996 Import from CVS: tag r20-2b2
cvs
parents: 131
diff changeset
1058 ;; (vm-set-debug-flags)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1059 ;; If this is the first time VM has been run in this Emacs session,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1060 ;; do some necessary preparations.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1061 (if (or (not (boundp 'vm-session-beginning))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1062 vm-session-beginning)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1063 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1064 (random t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1065 (vm-load-init-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1066 (if (not vm-window-configuration-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1067 (setq vm-window-configurations vm-default-window-configuration)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1068 (or (vm-load-window-configurations vm-window-configuration-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1069 (setq vm-window-configurations vm-default-window-configuration)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1070 (setq vm-buffers-needing-display-update (make-vector 29 0))
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
1071 ;; default value of vm-mime-button-face is 'gui-button-face
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
1072 ;; this face doesn't exist by default in FSF Emacs 19.34.
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
1073 ;; Create it.
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 110
diff changeset
1074 (and (fboundp 'make-face) (make-face 'gui-button-face))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1075 (and (vm-mouse-support-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1076 (vm-mouse-install-mouse))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1077 (and (vm-menu-support-possible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1078 vm-use-menus
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1079 (vm-menu-fsfemacs-menus-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1080 (vm-menu-initialize-vm-mode-menu-map))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1081 (setq vm-session-beginning nil))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1082
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1083 (autoload 'reporter-submit-bug-report "reporter")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1084 (autoload 'timezone-make-date-sortable "timezone")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1085 (autoload 'rfc822-addresses "rfc822")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1086 (autoload 'mail-strip-quoted-names "mail-utils")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1087 (autoload 'mail-fetch-field "mail-utils")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1088 (autoload 'mail-position-on-field "mail-utils")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1089 (autoload 'mail-send "sendmail")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1090 (autoload 'mail-mode "sendmail")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1091 (autoload 'mail-extract-address-components "mail-extr")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1092 (autoload 'set-tapestry "tapestry")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1093 (autoload 'tapestry "tapestry")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1094 (autoload 'tapestry-replace-tapestry-element "tapestry")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1095 (autoload 'tapestry-nullify-tapestry-elements "tapestry")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1096 (autoload 'tapestry-remove-frame-parameters "tapestry")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1097 (autoload 'vm-easy-menu-define "vm-easymenu" nil 'macro)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1098 (autoload 'vm-easy-menu-do-define "vm-easymenu")