30
|
1 ;;; Interface functions to VM internal data
|
|
2 ;;; Copyright (C) 1997 Kyle E. Jones
|
|
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 2, 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-user)
|
|
19
|
|
20 (defun vm-user-composition-folder-buffer ()
|
|
21 "Returns the folder buffer associated with the current buffer.
|
|
22 The current buffer must be a composition buffer created by VM for
|
|
23 a reply, resend or forward.
|
|
24
|
|
25 Nil is returned if the current buffer is not assocaited with any
|
|
26 VM folder.
|
|
27
|
|
28 Note that the buffer returned might be a virtual folder buffer,
|
|
29 which might have several underlying real folders associated with
|
|
30 it. To get the list of real folder buffers associated with a
|
|
31 composition buffer, use vm-user-composition-real-folder-buffers
|
|
32 instead."
|
|
33 (if (eq major-mode 'mail-mode)
|
|
34 vm-mail-buffer
|
|
35 nil ))
|
|
36
|
|
37 (defun vm-user-composition-real-folder-buffers ()
|
|
38 "Returns a list of the real folder buffers associated with the current
|
|
39 buffer. The current buffer must be a composition buffer created
|
|
40 by VM for a reply, resend or forward."
|
|
41 (if (eq major-mode 'mail-mode)
|
|
42 (let ((list nil) (newlist nil))
|
|
43 (cond ((eq vm-system-state 'replying)
|
|
44 (setq list vm-reply-list))
|
|
45 ((eq vm-system-state 'forwarding)
|
|
46 (setq list vm-forward-list))
|
|
47 ((eq vm-system-state 'redistributing)
|
|
48 (setq list vm-redistribute-list)))
|
|
49 (while list
|
|
50 (setq newlist (cons (vm-buffer-of (vm-real-message-of (car list)))
|
|
51 newlist)
|
|
52 list (cdr list)))
|
|
53 newlist )
|
|
54 nil ))
|