~ubuntu-branches/ubuntu/natty/vm/natty

« back to all changes in this revision

Viewing changes to debian/examples/dot.vm.2

  • Committer: Bazaar Package Importer
  • Author(s): Manoj Srivastava
  • Date: 2002-03-06 00:46:29 UTC
  • Revision ID: james.westby@ubuntu.com-20020306004629-d6hkaca872wyesmc
Tags: 7.03-1
* fixed defcustom syntax errors.
* minor compiler error cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;-*-emacs-lisp-*-
 
2
;From: Ian Jackson <iwj10@cus.cam.ac.uk>
 
3
;To: richard@elmail.co.uk (Richard Kettlewell)
 
4
;Subject: Re: ~/.vm
 
5
;Date: Sat, 12 Aug 95 16:28 BST
 
6
;
 
7
;Richard Kettlewell writes ("~/.vm"):
 
8
;> Do you have a ~/.vm file you would like to contribute to the Debian vm
 
9
;> package?
 
10
;
 
11
;I keep my vm startup stuff in ~/emacs/ian.el.  It could probably do
 
12
;with a bit of tweaking, but here it is.
 
13
;
 
14
;Ian.
 
15
 
 
16
; In Emacs 19 only, to override the default mouse bindings (which
 
17
; I don't like):
 
18
(add-hook 'vm-mode-hook 'unset-down-mouse-3)
 
19
(add-hook 'vm-mail-mode-hook 'unset-down-mouse-3)
 
20
 
 
21
; In my term-setup-hook function:
 
22
(global-set-key "m" 'vm-mail)
 
23
(global-set-key "4m" 'vm-mail-other-window)
 
24
(global-set-key "9" 'vm-visit-folder)
 
25
 
 
26
; To purge deleted messages automatically:
 
27
(add-hook 'vm-mode-hook
 
28
          '(lambda ()
 
29
             (local-set-key "Q" 'vm-quit)
 
30
             (local-set-key "q" "#Q")))
 
31
 
 
32
; ^X 4 m  does the right thing ...
 
33
(defun vm-mail-other-window ()
 
34
  "Like `vm-mail' command, but display buffer in another window."
 
35
  (interactive)
 
36
  (switch-to-buffer-other-window (current-buffer))
 
37
  (vm-mail))
 
38
 
 
39
; All my general variables
 
40
(setq vm-included-text-attribution-format "%F writes (\"%s\"):\n"
 
41
      vm-reply-subject-prefix "Re: "
 
42
      vm-folder-directory "~/mail/"
 
43
      vm-delete-after-saving t
 
44
      vm-delete-empty-folders t
 
45
      vm-mutable-windows nil
 
46
      vm-preview-lines nil
 
47
      vm-included-text-prefix "> "
 
48
      vm-confirm-quit 1
 
49
      vm-auto-center-summary t
 
50
      vm-confirm-new-folders t
 
51
      vm-circular-folders nil
 
52
      vm-visit-when-saving t
 
53
      vm-move-after-deleting t
 
54
      vm-keep-sent-messages t
 
55
      vm-follow-summary-cursor t
 
56
      vm-frame-per-composition nil
 
57
      vm-frame-per-edit nil
 
58
      vm-frame-per-summary nil
 
59
      vm-frame-per-folder nil
 
60
      vm-primary-inbox (concat vm-folder-directory "INBOX")
 
61
      vm-uninteresting-senders "ian"
 
62
      vm-spool-files '("~/mbox" "~/mail/Outbound" "~/mail/Record"
 
63
                       "~/mail/Import" "/usr/spool/mail/ian" "~/News/r")
 
64
      vm-startup-with-summary nil
 
65
      vm-summary-format "%3n %a %2d %3m  %-19.19F  %s\n"
 
66
      mail-archive-file-name "~/mail/Outbound")
 
67
 
 
68
 
 
69
 
 
70
; A whole lot of stuff for setting the Precedence header ...
 
71
(setq mail-precedence-key-alist
 
72
      '((?0  . "special-delivery")
 
73
        (?1  . "air-mail")
 
74
        (?2  . "first-class")
 
75
        (?3  . "second-class")
 
76
        (?5  . "third-class")
 
77
        (?\  . nil)
 
78
        (?6  . "bulk")
 
79
        (?9  . "junk")))
 
80
;
 
81
(defun mail-precedence-as-key ()
 
82
  "Set precedence by looking up last command char in mail-precedence-key-alist"
 
83
  (interactive)
 
84
  (message "%s" (concat "Precedence ["
 
85
                        (mapconcat '(lambda (c) (char-to-string (car c)))
 
86
                                   mail-precedence-key-alist "")
 
87
                        "] ?"))
 
88
  (let* ((key (read-char))
 
89
         (prec (assoc key mail-precedence-key-alist)))
 
90
    (if prec (mail-precedence (cdr prec))
 
91
      (error "mail-precedence-as-key `%s' not found" key))))
 
92
;
 
93
(defun mail-precedence-as-key-send-and-exit (arg)
 
94
  "Set precedence by looking up last command char in mail-precedence-key-alist,
 
95
then call send-and-exit."
 
96
  (interactive "P")
 
97
  (mail-precedence-as-key)
 
98
  (execute-kbd-macro ""))
 
99
;
 
100
(defun mail-precedence (prec)
 
101
  (save-excursion
 
102
    (mail-position-on-field "Precedence")
 
103
    (let ((p (point)))
 
104
      (beginning-of-line)
 
105
      (delete-region (point) p)
 
106
      (if prec
 
107
          (insert "Precedence: " prec)
 
108
        (delete-char 1)))))
 
109
;
 
110
(defun mail-mode-setup-keys ()
 
111
  (local-set-key "" 'mail-precedence-as-key)
 
112
  (local-set-key "p" 'mail-precedence-as-key-send-and-exit))
 
113
(add-hook 'mail-mode-hook 'mail-mode-setup-keys)
 
114
(add-hook 'vm-mail-mode-hook 'mail-mode-setup-keys)
 
115
;
 
116
 
 
117
 
 
118
 
 
119
; A quick tutorial on VM's MIME display variables.
 
120
 
 
121
; vm-display-using-mime controls whether MIME is displayed specially
 
122
; at all.  Default value is t.
 
123
 
 
124
; vm-auto-decode-mime-messages controls whether a MIME message is
 
125
; decoded when the message is selected.  Decoding means parsing the
 
126
; message to figure out what MIME types are in it.  This can be
 
127
; slow for large messages, so you might not want it to happen
 
128
; automatically.  Default value is t.
 
129
 
 
130
; vm-auto-displayed-mime-content-types controls which MIME types
 
131
; are displayed immediately after the message is decoded.
 
132
; Default value is ("text" "multipart").
 
133
 
 
134
; vm-auto-displayed-mime-content-type-exceptions lists exceptions
 
135
; to the auto-displayed types.  So you can specify "text" as an
 
136
; auto-displayed type and '("text/html") as the exceptions list to avoid
 
137
; immediate display of text/html.  Default value is nil.
 
138
 
 
139
 
 
140
 
 
141
 
 
142
 
 
143
 
 
144
 
 
145
 
 
146
 
 
147
 
 
148