;;; mspools.el --- show mail spools waiting to be read
-;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
;; Author: Stephen Eglen <stephen@gnu.org>
;; Maintainer: Stephen Eglen <stephen@gnu.org>
;; Useful settings for VM
;; vm-auto-get-new-mail should be t (the default).
-;; Acknowledgements
+;; Acknowledgments
;; Thanks to jond@mitre.org (Jonathan Doughty) for help with code for
;; setting up vm-spool-files.
)
(defcustom mspools-update nil
- "*Non-nil means update *spools* buffer after visiting any folder."
+ "Non-nil means update *spools* buffer after visiting any folder."
:type 'boolean
:group 'mspools)
(defcustom mspools-suffix "spool"
- "*Extension used for spool files (not including full stop)."
+ "Extension used for spool files (not including full stop)."
:type 'string
:group 'mspools)
(defcustom mspools-using-vm (fboundp 'vm)
- "*Non-nil if VM is used as mail reader, otherwise RMAIL is used."
+ "Non-nil if VM is used as mail reader, otherwise RMAIL is used."
:type 'boolean
:group 'mspools)
(if (boundp 'vm-folder-directory)
vm-folder-directory
"~/MAIL/")
- "*Directory where mail folders are kept. Ensure it has a trailing /.
+ "Directory where mail folders are kept. Ensure it has a trailing /.
Defaults to `vm-folder-directory' if bound else to ~/MAIL/."
:type 'directory
:group 'mspools)
(defcustom mspools-vm-system-mail (or (getenv "MAIL")
(concat rmail-spool-directory
(user-login-name)))
- "*Spool file for main mailbox. Only used by VM.
+ "Spool file for main mailbox. Only used by VM.
This needs to be set to your primary mail spool - mspools will not run
without it. By default this will be set to the environment variable
$MAIL. Otherwise it will use `rmail-spool-directory' to guess where
;; Mailing list inboxes
;; must have VM already loaded to get vm-folder-directory.
- (mapcar '(lambda (s)
- "make the appropriate entry for vm-spool-files"
- (list
- (concat mspools-folder-directory s)
- (concat mspools-folder-directory s "." mspools-suffix)
- (concat mspools-folder-directory s ".crash")))
+ (mapcar (lambda (s)
+ "make the appropriate entry for vm-spool-files"
+ (list
+ (concat mspools-folder-directory s)
+ (concat mspools-folder-directory s "." mspools-suffix)
+ (concat mspools-folder-directory s ".crash")))
;; So I create a vm-spool-files entry for each of those mail drops
(mapcar 'file-name-sans-extension
(directory-files mspools-folder-directory nil
))
(message "folder %s spool %s" folder-name spool-name)
- (if (eq (count-lines (point-min)
- (save-excursion
- (end-of-line)
- (point)))
+ (if (eq (count-lines (point-min) (point-at-eol))
mspools-files-len)
(forward-line (- 1 mspools-files-len)) ;back to top of list
;; else just on to next line
(defun mspools-get-spool-name ()
"Return the name of the spool on the current line."
- (let ((line-num (1- (count-lines (point-min)
- (save-excursion
- (end-of-line)
- (point))
- ))))
+ (let ((line-num (1- (count-lines (point-min) (point-at-eol)))))
(car (nth line-num mspools-files))))
;;; Spools mode functions
(provide 'mspools)
-;; arch-tag: 8990b3ee-68c8-4892-98f1-51a735c8bac6
;;; mspools.el ends here