1 ;;; vm-user.el --- Interface functions to VM internal data
3 ;; Copyright (C) 1997 Kyle E. Jones
4 ;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
6 ;; This program is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 2 of the License, or
9 ;; (at your option) any later version.
11 ;; This program is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;; GNU General Public License for more details.
16 ;; You should have received a copy of the GNU General Public License along
17 ;; with this program; if not, write to the Free Software Foundation, Inc.,
18 ;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 (defun vm-user-composition-folder-buffer ()
22 "Return the folder buffer associated with the current buffer.
23 The current buffer must be a composition buffer created by VM for
24 a reply, resend or forward.
26 Nil is returned if the current buffer is not associated with any
29 Note that the buffer returned might be a virtual folder buffer,
30 which might have several underlying real folders associated with
31 it. To get the list of real folder buffers associated with a
32 composition buffer, use vm-user-composition-real-folder-buffers
34 (if (eq major-mode 'mail-mode)
38 (defun vm-user-composition-real-folder-buffers ()
39 "Returns a list of the real folder buffers associated with the current
40 buffer. The current buffer must be a composition buffer created
41 by VM for a reply, resend or forward."
42 (if (eq major-mode 'mail-mode)
43 (let ((list nil) (newlist nil))
44 (cond ((eq vm-system-state 'replying)
45 (setq list vm-reply-list))
46 ((eq vm-system-state 'forwarding)
47 (setq list vm-forward-list))
48 ((eq vm-system-state 'redistributing)
49 (setq list vm-redistribute-list)))
51 (setq newlist (cons (vm-buffer-of (vm-real-message-of (car list)))
59 ;;; vm-user.el ends here