File: vm-init.el

package info (click to toggle)
vm 7.19-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,816 kB
  • ctags: 2,098
  • sloc: lisp: 31,152; sh: 322; ansic: 275; makefile: 202
file content (117 lines) | stat: -rw-r--r-- 4,402 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
;-*-emacs-lisp-*-
; arch-tag: 045640fd-0ff2-45b7-a29f-68e4b8378fbf

(if (file-readable-p (concat "=F" "/vm.elc"))
    (progn

      (provide 'vm-init)

      ;; Autoloads as per README

      (autoload 'vm "vm" "Start VM on your primary inbox." t)
      (autoload 'vm-other-frame "vm" "Like `vm' but starts in other frame." t)
      (autoload 'vm-visit-folder "vm" "Start VM on an arbitrary folder." t)
      (autoload 'vm-visit-virtual-folder "vm" "Visit a VM virtual folder." t)
      (autoload 'vm-mode "vm" "Run VM major mode on a buffer" t)
      (autoload 'vm-mail "vm" "Send a mail message using VM." t)
      (autoload 'vm-submit-bug-report "vm" "Send a bug report about VM." t)

      ;; Fixes for Debian

      (setq vm-pop-md5-program "md5sum"
	    vm-toolbar-pixmap-directory "/usr/share/emacs/site-lisp/vm/etc"
	    vm-image-directory "/usr/share/emacs/site-lisp/vm/etc"
	    )

      (if (fboundp 'debian-pkg-add-load-path-item)
	  (setq load-path (debian-pkg-add-load-path-item "=F"))
	(setq load-path (nconc load-path (list "=F"))))

      ;; Make sure that the uncompiled files are also in the
      ;; laod-path, though near the end.
      (setq load-path (nconc load-path (list "/usr/share/emacs/site-lisp/vm")))

      (setq  tm-vm/automatic-mime-preview nil)

      (if (not (boundp 'vm-mime-default-face-charsets))
	  (setq vm-mime-default-face-charsets '("us-ascii" "iso-8859-1")))
      (add-to-list 'vm-mime-default-face-charsets "Windows-1251")
      (add-to-list 'vm-mime-default-face-charsets "Windows-1252")
      (add-to-list 'vm-mime-default-face-charsets "Windows-1257")
      (add-to-list 'vm-mime-default-face-charsets "iso-8859-15")

      ;; This is no longer needed.
      ;;(setq file-coding-system nil) ;; this turns out undefined otherwise.

      ;; Useful stuff
      ;;; From: kyle_jones@wonderworks.com (Kyle Jones)
      ;;        ; Sender: info-vm-request@uunet.uu.net
      ;; To: carney@gvc.dec.com
      ;; Cc: info-vm@uunet.uu.net
      ;; Subject: filename completion in FCC:
      ;; Date: Sun, 6 Aug 1995 13:24:08 -0400
      ;;
      ;; Stephen Carney writes:
      ;; > Is it possible to have filename completion in the FCC field of
      ;; > the message header?
      ;;
      ;; This might be worth adding to VM.

      (require 'comint)

      (defun mail-mode-smart-tab ()
	(interactive)
	(if (save-excursion
	      (beginning-of-line)
	      (looking-at "FCC: "))
	    (comint-dynamic-complete)
	  (if (and (save-excursion
		     (search-forward
		      (concat "\n" mail-header-separator "\n")
		      nil t))
		   (featurep 'bbdb))
	      (bbdb-complete-name)
	    (tab-to-tab-stop))))

      (add-hook 'mail-setup-hook
		'(lambda () (local-set-key "\t" 'mail-mode-smart-tab)))

      ;; Clean up the mail presentation buffer
      (defun clean-vm-display ()
	(interactive)
	(or buffer-display-table
	    ;; Don't let disp-table.el overwrite standard-display-table:
	    (let ((standard-display-table standard-display-table))
	      (setq buffer-display-table (make-display-table))))
	;; Make A0 (\240) (non-breaking space) display as normal space
	(aset buffer-display-table ?\xA0 [\? ])
	(aset buffer-display-table ?\x91 [?\'])
	(aset buffer-display-table ?\x92 [?\'])
	(aset buffer-display-table ?\x93 [?\"])
	(aset buffer-display-table ?\x94 [?\"])
	(aset buffer-display-table ?\x96 [?\-])
	(aset buffer-display-table ?\x97 [?\-?\-])
	;; Make ^M invisible:
	(aset buffer-display-table ?\x0D []))

      ;; (add-hook 'vm-presentation-mode-hook 'clean-vm-display)

      ;; Uncomment these if you have the package mime-codecs installed
      ;; (setq
      ;;  vm-mime-qp-decoder-program "qp-decode"
      ;;  vm-mime-qp-encoder-program "qp-encode"
      ;;  vm-mime-base64-decoder-program "base64-decode"
      ;;  vm-mime-base64-encoder-program "base64-encode"
      ;;  )

      ;; If you have metamail, you would set these instead:
      ;;     (setq vm-mime-base64-decoder-program "mimencode")
      ;;     (setq vm-mime-base64-decoder-switches '("-u" "-b" "-p"))
      ;;     (setq vm-mime-base64-encoder-program "mimencode")
      ;;     (setq vm-mime-base64-encoder-switches '("-b"))
      ;;     (setq vm-mime-qp-decoder-program "mimencode")
      ;;     (setq vm-mime-qp-decoder-switches '("-u" "-q"))
      ;;     (setq vm-mime-qp-encoder-program "mimencode")
      ;;     (setq vm-mime-qp-encoder-switches '("-q"))
      ))