~ubuntu-branches/ubuntu/gutsy/vm/gutsy

« back to all changes in this revision

Viewing changes to vm-startup.el

  • Committer: Bazaar Package Importer
  • Author(s): Manoj Srivastava
  • Date: 2005-05-02 23:57:59 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050502235759-lsq60hinwkchrbxp
Tags: 7.19-4
* Bug fix: "vm: Please do not discriminate against XEmacs", thanks to
  Dirk Eddelbuettel. Well, back in the mists of time, VM was packaged to
  be byte-compiled for XEmacs, but the XEmacs maintainer at that time
  asked me to cease and desist. Times change, so that is reverted. 
                                                        (Closes: #306876).
* Bug fix: "vm: purge doesn't", thanks to Ian Zimmerman. This should be
  better.                                               (Closes: #303519).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;; Entry points for VM
2
 
;;; Copyright (C) 1994-1998 Kyle E. Jones
 
2
;;; Copyright (C) 1994-1998, 2003 Kyle E. Jones
3
3
;;;
4
4
;;; This program is free software; you can redistribute it and/or modify
5
5
;;; it under the terms of the GNU General Public License as published by
15
15
;;; along with this program; if not, write to the Free Software
16
16
;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
17
 
18
 
(provide 'vm-startup)
 
18
;;(provide 'vm-startup)
19
19
 
20
20
(defvar enable-multibyte-characters)
21
21
 
31
31
changes, message additions or deletions will be allowed in the
32
32
visited folder.
33
33
 
34
 
Visiting the primary inbox causes any contents of the system mailbox to
35
 
be moved and appended to the resulting buffer.
 
34
Visiting the primary inbox normally causes any contents of the system mailbox to
 
35
be moved and appended to the resulting buffer.  You can disable this automatic fetching of mail by setting `vm-auto-get-new-mail' to nil.
36
36
 
37
37
All the messages can be read by repeatedly pressing SPC.  Use `n'ext and
38
38
`p'revious to move about in the folder.  Messages are marked for
47
47
  ;; against letter bombs.
48
48
  ;; set enable-local-variables to nil for newer Emacses
49
49
  (catch 'done
 
50
    ;; deduce the access method if none specified
 
51
    (if (null access-method)
 
52
        (let ((f (or folder vm-primary-inbox)))
 
53
          (cond ((and vm-recognize-imap-maildrops
 
54
                      ;; f could be a buffer
 
55
                      (stringp f)
 
56
                      (string-match vm-recognize-imap-maildrops f))
 
57
                 (setq access-method 'imap
 
58
                       folder f))
 
59
                ((and vm-recognize-pop-maildrops
 
60
                      ;; f could be a buffer
 
61
                      (stringp f)
 
62
                      (string-match vm-recognize-pop-maildrops f))
 
63
                 (setq access-method 'pop
 
64
                       folder f)))))
50
65
    (let ((full-startup (not (bufferp folder)))
51
66
          (did-read-index-file nil)
52
67
          folder-buffer first-time totals-blurb
56
71
             (setq remote-spec (vm-pop-find-spec-for-name folder))
57
72
             (if (null remote-spec)
58
73
                 (error "No such POP folder: %s" folder))
59
 
             (setq folder-name folder
60
 
                   folder (vm-pop-make-filename-for-spec remote-spec))))
 
74
             (setq folder-name folder)
 
75
             ;; Prior to VM 7.11, we computed the cache filename
 
76
             ;; based on the full POP spec including the password
 
77
             ;; if it was in the spec.  This meant that every
 
78
             ;; time the user changed his password, we'd start
 
79
             ;; visiting the wrong (and probably nonexistent)
 
80
             ;; cache file.
 
81
             ;;
 
82
             ;; To fix this we do two things.  First, migrate the
 
83
             ;; user's caches to the filenames based in the POP
 
84
             ;; sepc without the password.  Second, we visit the
 
85
             ;; old password based filename if it still exists
 
86
             ;; after trying to migrate it.
 
87
             ;;
 
88
             ;; For VM 7.16 we apply the same logic to the access
 
89
             ;; methods, pop, pop-ssh and pop-ssl and to
 
90
             ;; authentication method and service port, which can
 
91
             ;; also change and lead us to visit a nonexistent
 
92
             ;; cache file.  The assumption is that these
 
93
             ;; properties of the connection can change and we'll
 
94
             ;; still be accessing the same mailbox on the
 
95
             ;; server.
 
96
             (let ((f-pass (vm-pop-make-filename-for-spec remote-spec))
 
97
                   (f-nopass (vm-pop-make-filename-for-spec remote-spec t))
 
98
                   (f-nospec (vm-pop-make-filename-for-spec remote-spec t t)))
 
99
               (cond ((or (string= f-pass f-nospec)
 
100
                          (file-exists-p f-nospec))
 
101
                      nil )
 
102
                     ((file-exists-p f-pass)
 
103
                      ;; try to migrate
 
104
                      (condition-case nil
 
105
                          (rename-file f-pass f-nospec)
 
106
                        (error nil)))
 
107
                     ((file-exists-p f-nopass)
 
108
                      ;; try to migrate
 
109
                      (condition-case nil
 
110
                          (rename-file f-nopass f-nospec)
 
111
                        (error nil))))
 
112
               ;; choose the one that exists, password version,
 
113
               ;; nopass version and finally nopass+nospec
 
114
               ;; version.
 
115
               (cond ((file-exists-p f-pass)
 
116
                      (setq folder f-pass))
 
117
                     ((file-exists-p f-nopass)
 
118
                      (setq folder f-nopass))
 
119
                     (t
 
120
                      (setq folder f-nospec)))))
 
121
            ((eq access-method 'imap)
 
122
             (setq remote-spec folder
 
123
                   folder-name (or (nth 3 (vm-imap-parse-spec-to-list
 
124
                                           remote-spec))
 
125
                                   folder)
 
126
                   folder (vm-imap-make-filename-for-spec remote-spec))))
61
127
      (setq folder-buffer
62
128
            (if (bufferp folder)
63
129
                folder
89
155
                                      (cons item vm-folder-history))))
90
156
                          (message "Reading %s... done" file))))))))
91
157
      (set-buffer folder-buffer)
92
 
      (cond ((eq access-method 'pop)
 
158
      (cond ((memq access-method '(pop imap))
93
159
             (if (not (equal folder-name (buffer-name)))
94
160
                 (rename-buffer folder-name t))))
95
161
      (if (and vm-fsfemacs-mule-p enable-multibyte-characters)
184
250
            (vm-fsfemacs-nonmule-display-8bit-chars)
185
251
            (vm-mode-internal access-method)
186
252
            (cond ((eq access-method 'pop)
187
 
                   (vm-set-folder-pop-maildrop-spec remote-spec)))
 
253
                   (vm-set-folder-pop-maildrop-spec remote-spec))
 
254
                  ((eq access-method 'imap)
 
255
                   (vm-set-folder-imap-maildrop-spec remote-spec)))
188
256
            ;; If the buffer is modified we don't know if the
189
257
            ;; folder format has been changed to be different
190
258
            ;; from index file, so don't read the index file in
311
379
                    (vm-update-summary-and-mode-line))))
312
380
            (message totals-blurb)))
313
381
 
314
 
      ;; Display copyright and copying info unless
315
 
      ;; user says no.
 
382
      ;; Display copyright and copying info.
316
383
      (if (and (interactive-p) (not vm-startup-message-displayed))
317
384
          (progn
318
385
            (vm-display-startup-message)
352
419
(defun vm-mode (&optional read-only)
353
420
  "Major mode for reading mail.
354
421
 
355
 
This is VM 7.03.
 
422
This is VM 7.19.
356
423
 
357
424
Commands:
358
425
   h - summarize folder contents
448
515
             that match those selectors.
449
516
       M ? - partial help for mark commands
450
517
 
451
 
 W S - save the current window configuration to a name
452
 
 W D - delete a window configuration
453
 
 W W - apply a configuration
454
 
 W ? - help for the window configuration commands
 
518
   W - prefix for window configuration commands:
 
519
       W S - save the current window configuration to a name
 
520
       W D - delete a window configuration
 
521
       W W - apply a configuration
 
522
       W ? - help for the window configuration commands
455
523
 
456
 
 V V - visit a virtual folder (must be defined in vm-virtual-folder-alist)
457
 
 V C - create a virtual folder composed of a subset of the
458
 
       current folder's messages.
459
 
 V A - create a virtual folder containing all the messages in the current
460
 
       folder with the same author as the current message.
461
 
 V S - create a virtual folder containing all the messages in the current
462
 
       folder with the same subject as the current message.
463
 
 V X - apply the selectors of a named virtual folder to the
464
 
       messages in the current folder and create a virtual folder
465
 
       containing the selected messages.
466
 
 V M - toggle whether this virtual folder's messages mirror the
467
 
       underlying real messages' attributes.
468
 
 V ? - help for virtual folder commands
 
524
   V - prefix for virtual folder commands:
 
525
       V V - visit a virtual folder (folder must be defined in
 
526
             vm-virtual-folder-alist)
 
527
       V C - create a virtual folder composed of a subset of
 
528
             the current folder's messages.
 
529
       V A - create a virtual folder containing all the messages in
 
530
             the current folder with the same author as the current message.
 
531
       V S - create a virtual folder containing all the messages in
 
532
             the current folder with the same subject as the current message.
 
533
       V X - apply the selectors of a named virtual folder to the messages in
 
534
             the current folder and create a virtual folder
 
535
             containing the selected messages.
 
536
       V M - toggle whether this virtual folder's messages mirror the
 
537
             underlying real messages' attributes.
 
538
       V ? - help for virtual folder commands
469
539
 
470
540
 C-_ - undo, special undo that retracts the most recent
471
541
             changes in message attributes and labels.  Expunges,
474
544
 
475
545
   a - set message attributes
476
546
 
477
 
 l a - add labels to message
478
 
 l d - delete labels from message
 
547
   l - prefix for label commands:
 
548
       l a - add labels to message
 
549
       l d - delete labels from message
479
550
 
480
551
   $ - prefix for MIME commands.  Position the cursor over a MIME
481
552
       tag and use these keystrokes to operate on a MIME object.
482
553
 
483
 
       $ s - save the MIME object
484
 
       $ p - print the MIME object
485
 
       $ | - pipe the MIME object to a shell command.
 
554
       RET   - display the MIME object according to its type.
 
555
       $ s   - save the MIME object
 
556
       $ p   - print the MIME object
 
557
       $ |   - pipe the MIME object to a shell command.
486
558
       $ RET - display the MIME object's text using the \"default\" face.
487
 
       $ e - display the MIME object with an external viewer.
488
 
       $ d - delete the MIME object from the message.
 
559
       $ e   - display the MIME object with an external viewer.
 
560
       $ d   - delete the MIME object from the message.
 
561
       $ v   - display the MIME object as some other type.
 
562
       $ w   - write the MIME object to a file.
 
563
       $ a   - attach the MIME object to a composition buffer.
489
564
 
490
565
   L - reload your VM init file, ~/.vm
491
566
 
522
597
   vm-crash-box
523
598
   vm-crash-box-suffix
524
599
   vm-default-From_-folder-type
 
600
   vm-default-folder-permission-bits
525
601
   vm-default-folder-type
526
602
   vm-delete-after-archiving
527
603
   vm-delete-after-bursting
556
632
   vm-frame-per-summary
557
633
   vm-highlighted-header-face
558
634
   vm-highlighted-header-regexp
 
635
   vm-honor-mime-content-disposition
559
636
   vm-honor-page-delimiters
 
637
   vm-icontopbm-program
560
638
   vm-image-directory
561
639
   vm-imagemagick-convert-program
562
640
   vm-imagemagick-identify-program
612
690
   vm-mime-digest-headers
613
691
   vm-mime-display-function
614
692
   vm-mime-external-content-types-alist
 
693
   vm-mime-forward-local-external-bodies
 
694
   vm-mime-ignore-composite-type-opaque-transfer-encoding
615
695
   vm-mime-ignore-mime-version
 
696
   vm-mime-ignore-missing-multipart-boundary
616
697
   vm-mime-internal-content-type-exceptions
617
698
   vm-mime-internal-content-types
618
699
   vm-mime-max-message-size
623
704
   vm-mime-require-mime-version-header
624
705
   vm-mime-type-converter-alist
625
706
   vm-mime-use-image-strips
 
707
   vm-mime-use-w3-for-text/html
626
708
   vm-mime-uuencode-decoder-program
627
709
   vm-mime-uuencode-decoder-switches
628
710
   vm-mode-hook
700
782
   vm-thread-using-subject
701
783
   vm-toolbar-pixmap-directory
702
784
   vm-trust-From_-with-Content-Length
 
785
   vm-uncompface-program
703
786
   vm-undisplay-buffer-hook
704
787
   vm-unforwarded-header-regexp
705
788
   vm-url-browser
 
789
   vm-url-browser-switches
706
790
   vm-url-retrieval-methods
707
791
   vm-url-search-limit
708
792
   vm-use-menus
763
847
                (setq foo (vm-pop-find-name-for-spec folder)))
764
848
           (setq folder foo
765
849
                 access-method 'pop))
 
850
          ((and (stringp vm-recognize-imap-maildrops)
 
851
                (string-match vm-recognize-imap-maildrops folder)
 
852
                (setq foo (vm-imap-find-name-for-spec folder)))
 
853
           (setq folder foo
 
854
                 access-method 'imap))
766
855
          (t
767
 
           (let ((default-directory (or vm-folder-directory default-directory)))
 
856
           (let ((default-directory (or vm-folder-directory default-directory)))
768
857
             (setq folder (expand-file-name folder)))))
769
858
    (vm folder read-only access-method)))
770
859
 
832
921
;;;###autoload
833
922
(defun vm-visit-pop-folder (folder &optional read-only)
834
923
  "Visit a POP mailbox.
835
 
VM will parse and present its messages to you in the usual way.
 
924
VM will present its messages to you in the usual way.  Messages
 
925
found in the POP mailbox will be downloaded and stored in a local
 
926
cache.  If you expunge messages from the cache, the corresponding
 
927
messages will be expunged from the POP mailbox.
836
928
 
837
929
First arg FOLDER specifies the name of the POP mailbox to visit.
838
930
You can only visit mailboxes that are specified in `vm-pop-folder-alist'.
931
1023
        (vm-search-other-frames nil))
932
1024
    (vm-visit-pop-folder folder read-only)))
933
1025
 
 
1026
;;;###autoload
 
1027
(defun vm-visit-imap-folder (folder &optional read-only)
 
1028
  "Visit a IMAP mailbox.
 
1029
VM will present its messages to you in the usual way.  Messages
 
1030
found in the IMAP mailbox will be downloaded and stored in a local
 
1031
cache.  If you expunge messages from the cache, the corresponding
 
1032
messages will be expunged from the IMAP mailbox.
 
1033
 
 
1034
First arg FOLDER specifies the IMAP mailbox to visit.  You can only
 
1035
visit mailboxes on servers that are listed in `vm-imap-server-list'.
 
1036
When this command is called interactively the server and mailbox
 
1037
names are read from the minibuffer.
 
1038
 
 
1039
Prefix arg or optional second arg READ-ONLY non-nil indicates
 
1040
that the folder should be considered read only.  No attribute
 
1041
changes, messages additions or deletions will be allowed in the
 
1042
visited folder."
 
1043
  (interactive
 
1044
   (save-excursion
 
1045
     (vm-session-initialization)
 
1046
     (vm-check-for-killed-folder)
 
1047
     (vm-select-folder-buffer-if-possible)
 
1048
     (let ((this-command this-command)
 
1049
           (last-command last-command))
 
1050
       (list (vm-read-imap-folder-name
 
1051
              (format "Visit%s IMAP folder: "
 
1052
                      (if current-prefix-arg " read only" ""))
 
1053
              vm-imap-server-list t)
 
1054
             current-prefix-arg))))
 
1055
  (vm-session-initialization)
 
1056
  (vm-check-for-killed-folder)
 
1057
  (vm-select-folder-buffer-if-possible)
 
1058
  (vm-check-for-killed-summary)
 
1059
  (vm folder read-only 'imap))
 
1060
 
 
1061
;;;###autoload
 
1062
(defun vm-visit-imap-folder-other-frame (folder &optional read-only)
 
1063
  "Like vm-visit-imap-folder, but run in a newly created frame."
 
1064
  (interactive
 
1065
   (save-excursion
 
1066
     (vm-session-initialization)
 
1067
     (vm-check-for-killed-folder)
 
1068
     (vm-select-folder-buffer-if-possible)
 
1069
     (let ((this-command this-command)
 
1070
           (last-command last-command))
 
1071
       (list (vm-read-imap-folder-name
 
1072
              (format "Visit%s IMAP folder: "
 
1073
                      (if current-prefix-arg " read only" ""))
 
1074
              vm-imap-server-list)
 
1075
             current-prefix-arg))))
 
1076
  (vm-session-initialization)
 
1077
  (if (vm-multiple-frames-possible-p)
 
1078
      (vm-goto-new-frame 'folder))
 
1079
  (let ((vm-frame-per-folder nil)
 
1080
        (vm-search-other-frames nil))
 
1081
    (vm-visit-imap-folder folder read-only))
 
1082
  (if (vm-multiple-frames-possible-p)
 
1083
      (vm-set-hooks-for-frame-deletion)))
 
1084
 
 
1085
;;;###autoload
 
1086
(defun vm-visit-imap-folder-other-window (folder &optional read-only)
 
1087
  "Like vm-visit-imap-folder, but run in a different window."
 
1088
  (interactive
 
1089
   (save-excursion
 
1090
     (vm-session-initialization)
 
1091
     (vm-check-for-killed-folder)
 
1092
     (vm-select-folder-buffer-if-possible)
 
1093
     (let ((this-command this-command)
 
1094
           (last-command last-command))
 
1095
       (list (vm-read-imap-folder-name
 
1096
              (format "Visit%s IMAP folder: "
 
1097
                      (if current-prefix-arg " read only" ""))
 
1098
              vm-imap-server-list)
 
1099
             current-prefix-arg))))
 
1100
  (vm-session-initialization)
 
1101
  (if (one-window-p t)
 
1102
      (split-window))
 
1103
  (other-window 1)
 
1104
  (let ((vm-frame-per-folder nil)
 
1105
        (vm-search-other-frames nil))
 
1106
    (vm-visit-imap-folder folder read-only)))
 
1107
 
934
1108
(put 'vm-virtual-mode 'mode-class 'special)
935
1109
 
936
1110
(defun vm-virtual-mode (&rest ignored)
947
1121
(defvar scroll-in-place)
948
1122
 
949
1123
;;;###autoload
950
 
(defun vm-visit-virtual-folder (folder-name &optional read-only)
 
1124
(defun vm-visit-virtual-folder (folder-name &optional read-only bookmark)
951
1125
  (interactive
952
1126
   (let ((last-command last-command)
953
1127
         (this-command this-command))
997
1171
          (setq major-mode 'vm-virtual-mode)
998
1172
          (run-hooks 'vm-virtual-mode-hook)
999
1173
          ;; must come after the setting of major-mode
1000
 
          (setq mode-popup-menu (and vm-use-menus vm-popup-menu-on-mouse-3
 
1174
          (setq mode-popup-menu (and vm-use-menus
1001
1175
                                     (vm-menu-support-possible-p)
1002
1176
                                     (vm-menu-mode-menu)))
1003
1177
          (setq blurb (vm-emit-totals-blurb))
1004
1178
          (if vm-summary-show-threads
1005
1179
              (vm-sort-messages "thread"))
1006
 
          (if (vm-thoughtfully-select-message)
1007
 
              (vm-preview-current-message)
1008
 
            (vm-update-summary-and-mode-line))
 
1180
          (if bookmark
 
1181
              (let ((mp vm-message-list))
 
1182
                (while mp
 
1183
                  (if (eq bookmark (vm-real-message-of (car mp)))
 
1184
                      (progn
 
1185
                        (vm-record-and-change-message-pointer
 
1186
                         vm-message-pointer mp)
 
1187
                        (vm-preview-current-message)
 
1188
                        (setq mp nil))
 
1189
                    (setq mp (cdr mp))))))
 
1190
          (if (null vm-message-pointer)
 
1191
              (if (vm-thoughtfully-select-message)
 
1192
                  (vm-preview-current-message)
 
1193
                (vm-update-summary-and-mode-line)))
1009
1194
          (message blurb)))
1010
1195
    ;; make a new frame if the user wants one.  reuse an
1011
1196
    ;; existing frame that is showing this folder.
1239
1424
      (funcall (or switch-function (function switch-to-buffer))
1240
1425
               (current-buffer))
1241
1426
      (if yank-action
1242
 
          (apply (car yank-action) (cdr yank-action)))
 
1427
          (save-excursion
 
1428
            (mail-text)
 
1429
            (apply (car yank-action) (cdr yank-action))
 
1430
            (push-mark (point))
 
1431
            (mail-text)
 
1432
            (cond (mail-citation-hook (run-hooks 'mail-citation-hook))
 
1433
                  (mail-yank-hooks (run-hooks 'mail-yank-hooks))
 
1434
                  (t (vm-mail-yank-default)))))
1243
1435
      (make-local-variable 'mail-send-actions)
1244
1436
      (setq mail-send-actions send-actions))))
1245
1437
 
1280
1472
      'vm-crash-box
1281
1473
      'vm-crash-box-suffix
1282
1474
      'vm-default-From_-folder-type
 
1475
      'vm-default-folder-permission-bits
1283
1476
      'vm-default-folder-type
1284
1477
      'vm-delete-after-archiving
1285
1478
      'vm-delete-after-bursting
1316
1509
      'vm-frame-per-summary
1317
1510
      'vm-highlight-url-face
1318
1511
      'vm-highlighted-header-regexp
 
1512
      'vm-honor-mime-content-disposition
1319
1513
      'vm-honor-page-delimiters
 
1514
      'vm-icontopbm-program
1320
1515
      'vm-image-directory
1321
1516
      'vm-imagemagick-convert-program
1322
1517
      'vm-imagemagick-identify-program
1375
1570
      'vm-mime-digest-headers
1376
1571
      'vm-mime-display-function
1377
1572
      'vm-mime-external-content-types-alist
 
1573
      'vm-mime-forward-local-external-bodies
 
1574
      'vm-mime-ignore-composite-type-opaque-transfer-encoding
1378
1575
      'vm-mime-ignore-mime-version
 
1576
      'vm-mime-ignore-missing-multipart-boundary
1379
1577
      'vm-mime-internal-content-type-exceptions
1380
1578
      'vm-mime-internal-content-types
1381
1579
      'vm-mime-max-message-size
1386
1584
      'vm-mime-require-mime-version-header
1387
1585
      'vm-mime-type-converter-alist
1388
1586
      'vm-mime-use-image-strips
 
1587
      'vm-mime-use-w3-for-text/html
1389
1588
      'vm-mime-uuencode-decoder-program
1390
1589
      'vm-mime-uuencode-decoder-switches
1391
1590
      'vm-mode-hook
1471
1670
      'vm-thread-using-subject
1472
1671
      'vm-toolbar-pixmap-directory
1473
1672
      'vm-trust-From_-with-Content-Length
 
1673
      'vm-uncompface-program
1474
1674
      'vm-undisplay-buffer-hook
1475
1675
      'vm-unforwarded-header-regexp
1476
1676
      'vm-url-browser
 
1677
      'vm-url-browser-switches
1477
1678
      'vm-url-retrieval-methods
1478
1679
      'vm-url-search-limit
1479
1680
      'vm-use-menus
1554
1755
          (or (vm-load-window-configurations vm-window-configuration-file)
1555
1756
              (setq vm-window-configurations vm-default-window-configuration)))
1556
1757
        (setq vm-buffers-needing-display-update (make-vector 29 0))
 
1758
        (setq vm-buffers-needing-undo-boundaries (make-vector 29 0))
 
1759
        (add-hook 'post-command-hook 'vm-add-undo-boundaries)
1557
1760
        (if (if (fboundp 'find-face)
1558
1761
                (find-face 'vm-monochrome-image)
1559
1762
              (facep 'vm-monochrome-image))
1588
1791
                     ;; names may not be valid.
1589
1792
                     (set-face-foreground 'gui-button-face "white")
1590
1793
                     (set-face-background 'gui-button-face "red")))))
 
1794
        ;; gui-button-face might not exist under XEmacs either.
 
1795
        ;; This can happen if XEmacs is built without window
 
1796
        ;; system support.  In any case, create it anyway.
 
1797
        (if (and vm-xemacs-p (not (find-face 'gui-button-face)))
 
1798
            (progn
 
1799
              (make-face 'gui-button-face)
 
1800
              (set-face-foreground 'gui-button-face "black" nil '(win))
 
1801
              (set-face-background 'gui-button-face "gray75" nil '(win))
 
1802
              (set-face-foreground 'gui-button-face "white" nil '(tty))
 
1803
              (set-face-background 'gui-button-face "red" nil '(tty))))
1591
1804
        (and (vm-mouse-support-possible-p)
1592
1805
             (vm-mouse-install-mouse))
1593
1806
        (and (vm-menu-support-possible-p)
1599
1812
(if (fboundp 'define-mail-user-agent)
1600
1813
    (define-mail-user-agent 'vm-user-agent
1601
1814
      (function vm-compose-mail)        ; compose function
1602
 
      (function vm-send-mail-and-exit)  ; send function
 
1815
      (function vm-mail-send-and-exit)  ; send function
1603
1816
      nil                               ; abort function (kill-buffer)
1604
1817
      nil)                              ; hook variable (mail-send-hook)
1605
1818
)
1620
1833
(autoload 'tapestry-remove-frame-parameters "tapestry")
1621
1834
(autoload 'vm-easy-menu-define "vm-easymenu" nil 'macro)
1622
1835
(autoload 'vm-easy-menu-do-define "vm-easymenu")
 
1836
 
 
1837
(provide 'vm-startup)