~ubuntu-branches/ubuntu/precise/vm/precise

« back to all changes in this revision

Viewing changes to debian/vm-init.el

  • Committer: Bazaar Package Importer
  • Author(s): Manoj Srivastava
  • Date: 2008-04-27 22:51:03 UTC
  • mfrom: (1.1.3 upstream) (4.1.2 gutsy)
  • Revision ID: james.westby@ubuntu.com-20080427225103-n26mjacjrnmcqwx9
Tags: 8.0.9-4
* Updated the control file to reflect moving the package to a public git
  repository at http://git.debian.org/git/users/srivasta/debian/vm.git
* Bug fix: "vm: Error while loading 50vm-init", thanks to Laurent
  Bonnaud. Since the variable is defined in vm-vars, as is the missing
  function, wrap the setting of the pixamp directory in an
  eval-after-load vm-vars.                               (Closes: #475646).

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
    (progn
6
6
 
7
7
      (provide 'vm-init)
8
 
 
9
 
      ;; Autoloads as per README
10
 
 
11
 
      (autoload 'vm "vm" "Start VM on your primary inbox." t)
12
 
      (autoload 'vm-other-frame "vm" "Like `vm' but starts in other frame." t)
13
 
      (autoload 'vm-visit-folder "vm" "Start VM on an arbitrary folder." t)
14
 
      (autoload 'vm-visit-virtual-folder "vm" "Visit a VM virtual folder." t)
15
 
      (autoload 'vm-mode "vm" "Run VM major mode on a buffer" t)
16
 
      (autoload 'vm-mail "vm" "Send a mail message using VM." t)
17
 
      (autoload 'vm-submit-bug-report "vm" "Send a bug report about VM." t)
18
 
      (autoload 'vm-mouse-install-mouse "vm-mouse" "Install VM menu on mouse buttons." t)
19
 
 
 
8
      (require 'vm-autoload)
20
9
      ;; Fixes for Debian
21
 
 
22
 
      (setq vm-pop-md5-program "md5sum"
23
 
            vm-toolbar-pixmap-directory "/usr/share/emacs/site-lisp/vm/etc"
24
 
            vm-image-directory "/usr/share/emacs/site-lisp/vm/etc"
25
 
            )
26
 
 
27
10
      (if (fboundp 'debian-pkg-add-load-path-item)
28
 
          (setq load-path (debian-pkg-add-load-path-item "=F"))
29
 
        (setq load-path (nconc load-path (list "=F"))))
30
 
 
31
 
      ;; Make sure that the uncompiled files are also in the
32
 
      ;; laod-path, though near the end.
33
 
      (setq load-path (nconc load-path (list "/usr/share/emacs/site-lisp/vm")))
34
 
 
35
 
      (setq  tm-vm/automatic-mime-preview nil)
36
 
 
37
 
      (if (not (boundp 'vm-mime-default-face-charsets))
38
 
          (setq vm-mime-default-face-charsets '("us-ascii" "iso-8859-1")))
39
 
      (add-to-list 'vm-mime-default-face-charsets "Windows-1251")
40
 
      (add-to-list 'vm-mime-default-face-charsets "Windows-1252")
41
 
      (add-to-list 'vm-mime-default-face-charsets "Windows-1257")
42
 
      (add-to-list 'vm-mime-default-face-charsets "iso-8859-15")
43
 
 
44
 
      ;; This is no longer needed.
45
 
      ;;(setq file-coding-system nil) ;; this turns out undefined otherwise.
46
 
 
47
 
      ;; Useful stuff
48
 
      ;;; From: kyle_jones@wonderworks.com (Kyle Jones)
49
 
      ;;        ; Sender: info-vm-request@uunet.uu.net
50
 
      ;; To: carney@gvc.dec.com
51
 
      ;; Cc: info-vm@uunet.uu.net
52
 
      ;; Subject: filename completion in FCC:
53
 
      ;; Date: Sun, 6 Aug 1995 13:24:08 -0400
54
 
      ;;
55
 
      ;; Stephen Carney writes:
56
 
      ;; > Is it possible to have filename completion in the FCC field of
57
 
      ;; > the message header?
58
 
      ;;
59
 
      ;; This might be worth adding to VM.
60
 
 
61
 
      (require 'comint)
62
 
 
63
 
      (defun mail-mode-smart-tab ()
64
 
        (interactive)
65
 
        (if (save-excursion
66
 
              (beginning-of-line)
67
 
              (looking-at "FCC: "))
68
 
            (comint-dynamic-complete)
69
 
          (if (and (save-excursion
70
 
                     (search-forward
71
 
                      (concat "\n" mail-header-separator "\n")
72
 
                      nil t))
73
 
                   (featurep 'bbdb))
74
 
              (bbdb-complete-name)
75
 
            (tab-to-tab-stop))))
76
 
 
77
 
      (add-hook 'mail-setup-hook
78
 
                '(lambda () (local-set-key "\t" 'mail-mode-smart-tab)))
79
 
 
80
 
      ;; Clean up the mail presentation buffer
81
 
      (defun clean-vm-display ()
82
 
        (interactive)
83
 
        (or buffer-display-table
84
 
            ;; Don't let disp-table.el overwrite standard-display-table:
85
 
            (let ((standard-display-table standard-display-table))
86
 
              (setq buffer-display-table (make-display-table))))
87
 
        ;; Make A0 (\240) (non-breaking space) display as normal space
88
 
        (aset buffer-display-table ?\xA0 [\? ])
89
 
        (aset buffer-display-table ?\x91 [?\'])
90
 
        (aset buffer-display-table ?\x92 [?\'])
91
 
        (aset buffer-display-table ?\x93 [?\"])
92
 
        (aset buffer-display-table ?\x94 [?\"])
93
 
        (aset buffer-display-table ?\x96 [?\-])
94
 
        (aset buffer-display-table ?\x97 [?\-?\-])
95
 
        ;; Make ^M invisible:
96
 
        (aset buffer-display-table ?\x0D []))
97
 
 
98
 
      ;; (add-hook 'vm-presentation-mode-hook 'clean-vm-display)
 
11
          (setq load-path (debian-pkg-add-load-path-item "=F"))
 
12
        (setq load-path (nconc load-path (list "=F"))))
 
13
      (eval-after-load 'vm-vars
 
14
        '(setq
 
15
          vm-toolbar-pixmap-directory
 
16
          (if (string-match "'--with-gtk'\\|'--with-x-toolkit=gtk'"
 
17
                            system-configuration-options)
 
18
              (concat (vm-pixmap-directory) "/gtk")
 
19
            (vm-pixmap-directory))))
99
20
 
100
21
      ;; Uncomment these if you have the package mime-codecs installed
101
22
      ;; (setq