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