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